0
0
Azurecloud~10 mins

Node pools and scaling in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Node pools and scaling
Create AKS Cluster
Add Node Pool(s)
Set Node Pool Size
Monitor Load
Scale Node Pool Up or Down
Update Cluster State
This flow shows creating a cluster, adding node pools, setting their size, monitoring load, and scaling node pools accordingly.
Execution Sample
Azure
az aks create --resource-group myRG --name myAKS --node-count 2
az aks nodepool add --resource-group myRG --cluster-name myAKS --name np1 --node-count 3
az aks nodepool scale --resource-group myRG --cluster-name myAKS --name np1 --node-count 5
This code creates an AKS cluster with 2 nodes, adds a node pool with 3 nodes, then scales that node pool to 5 nodes.
Process Table
StepActionNode PoolNode Count BeforeNode Count AfterCluster State
1Create AKS clusterdefault02Cluster with default node pool of 2 nodes
2Add node pool np1np103Cluster has default (2 nodes) + np1 (3 nodes)
3Scale node pool np1np135Cluster has default (2 nodes) + np1 (5 nodes)
4Monitor load---Load monitored, triggers scaling if needed
5Scale node pool np1 downnp154Cluster has default (2 nodes) + np1 (4 nodes)
6Scale node pool np1 upnp146Cluster has default (2 nodes) + np1 (6 nodes)
7Exit---Scaling complete, cluster stable
💡 Scaling operations complete, cluster node pools adjusted as requested
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 5After Step 6Final
default_node_pool_count0222222
np1_node_pool_count0035466
cluster_total_nodes0257688
Key Moments - 3 Insights
Why does the cluster have nodes before adding a new node pool?
Because the default node pool is created with the cluster initially (see Step 1 in execution_table), so nodes exist before adding extra node pools.
What happens if you scale a node pool to a smaller number than before?
The node count decreases accordingly (see Step 5), reducing cluster capacity but keeping the cluster stable.
Does scaling one node pool affect the other node pools?
No, scaling affects only the specified node pool (see Steps 3, 5, 6), other node pools keep their node counts.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the node count of node pool 'np1' after Step 3?
A3
B2
C5
D0
💡 Hint
Check the 'Node Count After' column for Step 3 in execution_table.
At which step does the cluster have a total of 8 nodes?
AStep 5
BStep 6
CStep 3
DStep 2
💡 Hint
Look at 'cluster_total_nodes' in variable_tracker after each step.
If you remove the default node pool, how would the cluster total nodes change after Step 1?
AIt would be 0
BIt would be 2
CIt would be 3
DIt would be 5
💡 Hint
Default node pool count is 2 after Step 1; removing it means zero nodes initially.
Concept Snapshot
Node pools are groups of nodes in an AKS cluster.
You can add multiple node pools with different sizes.
Scaling changes the number of nodes in a node pool.
Scaling one node pool does not affect others.
Monitor load to decide when to scale up or down.
Full Transcript
This visual execution shows how an Azure Kubernetes Service (AKS) cluster is created with a default node pool. Then, a new node pool named 'np1' is added with 3 nodes. The node pool 'np1' is scaled up to 5 nodes, then later scaled down and up again. The cluster state updates after each scaling operation. Variables track the number of nodes in each pool and total nodes in the cluster. Key moments clarify that the default node pool exists from the start, scaling affects only the targeted node pool, and scaling down reduces nodes safely. The quiz tests understanding of node counts after steps and effects of removing node pools. The snapshot summarizes node pools and scaling basics in AKS.