question

VigneshMurugan-8783 avatar image
0 Votes"
VigneshMurugan-8783 asked learn2skills commented

Automatic label assigning for new node in Cluster auto scaling

Hi All,

Good day!

We are working with AKS clusters. We would like to enable cluster autoscaling on AKS. We have set some labels on existing node inorder to host the pods(e.g node1 having label as app=web). Now the question is, incase of an additional node gets added to the cluster let say due to high memory utilization will it come up with the same label we set it for other existing nodes in the cluster?
If so, do we have to setup anything or it will invoke automatically.


Thanks in advance.

azure-kubernetes-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

learn2skills avatar image
0 Votes"
learn2skills answered learn2skills commented

Hi @VigneshMurugan-8783

You can also add labels to a node pool during node pool creation. Labels set at the node pool are added to each node in the node pool. These labels are visible in Kubernetes for handling scheduling rules for nodes.
If the node pool is autoscaled all nodes subsequently added will be the same labels and pods with affinity or node selectors defined should not have any issues being scheduled.
more details
https://docs.microsoft.com/en-us/azure/aks/use-multiple-node-pools#setting-nodepool-labels

You can apply an Azure tag to node pools in your AKS cluster. Tags applied to a node pool are applied to each node within the node pool and are persisted through upgrades. Tags are also applied to new nodes added to a node pool during scale-out operations. Adding a tag can help with tasks such as policy tracking or cost estimation.
https://docs.microsoft.com/en-us/azure/aks/use-multiple-node-pools#setting-nodepool-azure-tags




If the Answer is helpful, please click Accept Answer and up-vote, so that it can help others in the community looking for help on similar topics.



· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@learn2skills

Thanks for the update. Just wanted to understand one more thing here, can we add labels for existing node pools?

1 Vote 1 ·

You can't change the node labels through CLI after the node pool is created.
See https://aka.ms/node-labels for syntax of labels.


0 Votes 0 ·

@learn2skills

Thanks for the update. Just wanted to understand one more thing here, can we add labels for existing node pools?

0 Votes 0 ·