Scaling a Cluster Up

You can increase the number of nodes to an Azure cluster using either the Azure Portal or Azure Cloud Shell. After increasing the number of nodes, you must then label all new nodes.

To add nodes to a cluster using the Azure Portal:

  1. In the Azure Portal, locate the Azure Kubernetes resource group. (The AKS resource group name is in the format MC_<your_resource_group>_<aks_name>_<location>.)
  2. Open the virtual machine scale set. (The scale set name is in the format aks-nodepool1-<NUMBER>-vmss.)
  3. Under Settings, click Scaling.
  4. In instance count, increase the value to the desired number of nodes in the cluster.

To add nodes to a cluster using the Azure Cloud Shell or jumphost CLI:

  1. Get the AKS resource group and store it in an environment variable for later usage:
    # CLUSTER_RESOURCE_GROUP=$(az aks show --resource-group <RESOURCE GROUP> --name <AKS NAME> --query nodeResourceGroup -o tsv)
ID Note: For example:
# CLUSTER_RESOURCE_GROUP=$(az aks show --resource-group srg-demo --name srg-demo-aks --query nodeResourceGroup -o tsv)

 

  1. Get the AKS Virtual machine scale set by running the following command:
    # VMSS=$(az vmss list -g $CLUSTER_RESOURCE_GROUP | jq -r .[0].name)

 

  1. Get the current number of nodes by running the following command:
    # az vmss list -g $CLUSTER_RESOURCE_GROUP | jq -r '.[0].sku.capacity'

 

  1. Add instances by increasing the value of the new-capacity parameter to reflect the new number of instances. For example:
    # az vmss scale --resource-group $CLUSTER_RESOURCE_GROUP --name $VMSS --new-capacity 5

To label new nodes:

  1. Get a list of all nodes by running the following command:
    # kubectl get nodes
  2. Select one of the new nodes and label it by running the following command:
    # kubectl label node <virtual_machine_scale_set> role=loadbalancer Worker=label <<label1> <label2>... <labelN>

Parameters:

For example:
kubectl label node aks-nodepool1-84569686-vmss000003 role=loadbalancer Worker=label zk=yes kafka=yes th-platform=yes th-processing=yes
  1. Repeat Step 2 for each of the other new nodes.
  2. If any of the new nodes contain ZooKeeper and Kafka pods, new partitions must be assigned. Launch the Kafka Manager.
  3. Click the Topics list.
  4. Click Generate New Partition Assignments.
  5. Assign the desired topics to the new nodes.
  6. Click Run Partition Assignments.