Installing AKS
Prepare Microsoft Azure Kubernetes Service (AKS) for the Couchbase Autonomous Operator.
Tutorials are accurate at the time of writing but rely heavily on third party software. Tutorials are provided to demonstrate how a particular problem may be solved. Use of third party software is not supported by Couchbase. For further help in the event of a problem, contact the relevant software maintainer. |
This guide walks through the recommended procedure for installing the Couchbase Autonomous Operator on Microsoft Azure Kubernetes Service (AKS).
Prerequisites
Install the azure-cli
and login to the Azure Portal.
$ az login
Get a list of your subscriptions.
$ az account list --output table
Set the subscription ID or name you want to use.
$ az account set --subscription "My Subscription"
AKS Setup
Create a Resource Group
Resource groups allow administrators to co-locate and coordinate operations across a group of resources such as VMs, disks, and networks. All resources created by AKS will belong to this group.
$ az group create --name myResourceGroup --location eastus
Create a Network
In order for XDCR to work, a layer 3 tunnel between the two cluster networks is required. This is so that nodes on one network can talk to nodes on the other, which are in turn port-forwarded onto your Couchbase nodes. As such, these must be non-overlapping. If we use the default setting, the first cluster would get the prefix 10.0.0.0/8, as would the second.
$ az network vnet create -g myResourceGroup -n myAKSVnet --address-prefix 10.0.0.0/12 --subnet-name myAKSSubnet --subnet-prefix 10.8.0.0/16
Create the AKS Cluster
Create an AKS cluster within the allocated resource group on the subnet created in the previous step.
Note monitoring is enabled and ssh-keys are being auto-generated.
Also, the default virtual machine type is Standard_DS2_v2
which supports a maximum of 4 disks per VM.
(See Best Practices for recommended VM size based on the requirements of your deployment.)
$ subnet_id=$(az network vnet show -g myResourceGroup -n myAKSVnet --query 'subnets[].id' -o tsv)
$ az aks create -g myResourceGroup -n myAKSCluster --node-count 3 --vnet-subnet-id $subnet_id --service-cidr 10.0.0.0/16 --dns-service-ip 10.0.0.10 --generate-ssh-keys --location eastus --network-plugin azure --kubernetes-version 1.24.6
To check that the
|
Installing the Operator and Couchbase
Once you’ve properly deployed the Kubernetes cluster with Microsoft AKS, you can install the Operator, and use it to deploy a Couchbase cluster as normal.
If you do not already have kubectl
installed in your CLI, run the following command:
$ az aks install-cli
Get the credentials for your cluster:
$ az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
Upgrading the AKS Cluster
An AKS cluster can be upgraded to a new version if applicable.
The following steps outline how to perform an upgrade using the az-cli tool, but the same steps can be performed through the Azure Portal.
|
To check if a new version is available for your cluster, use the get-upgrades
command:
$ az aks get-upgrades -g myResourceGroup -n myAKSCluster --query 'agentPoolProfiles[].upgrades' -o tsv
To proceed with an upgrade, simply run the upgrade
command with the desired version:
$ az aks upgrade -g myResourceGroup -n myAKSCluster --kubernetes-version 1.24.6