0
0
Kubernetesdevops~20 mins

Cluster Autoscaler concept in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cluster Autoscaler Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does Cluster Autoscaler decide to add nodes?

Cluster Autoscaler watches the pods and nodes in a Kubernetes cluster. When does it decide to add new nodes?

AWhen a node fails health checks repeatedly.
BWhen CPU usage on existing nodes exceeds 90%.
CWhen there are pods that cannot be scheduled due to insufficient resources on existing nodes.
DWhen the number of pods exceeds a fixed threshold regardless of resource availability.
Attempts:
2 left
💡 Hint

Think about what causes pods to wait for resources.

💻 Command Output
intermediate
1:30remaining
Output of Cluster Autoscaler status command

What is the expected output of the command kubectl get deployment cluster-autoscaler -n kube-system -o jsonpath='{.status.availableReplicas}' if the Cluster Autoscaler is running with 1 replica?

A1
B0
Cnull
DError: deployment not found
Attempts:
2 left
💡 Hint

Check the meaning of availableReplicas in deployment status.

Configuration
advanced
2:30remaining
Correct Cluster Autoscaler flag to ignore nodes with specific label

You want Cluster Autoscaler to ignore nodes labeled autoscaler=disabled. Which flag should you add to the Cluster Autoscaler deployment?

A--skip-nodes-with-label=autoscaler=disabled
B--ignore-nodes-with-label=autoscaler=disabled
C--exclude-nodes-with-label=autoscaler=disabled
D--filter-nodes-with-label=autoscaler=disabled
Attempts:
2 left
💡 Hint

Check official Cluster Autoscaler flags for ignoring nodes by label.

Troubleshoot
advanced
2:30remaining
Why does Cluster Autoscaler not remove underutilized nodes?

Cluster Autoscaler is running but does not remove nodes even though some nodes have very low CPU and memory usage. What could be a reason?

ACluster Autoscaler only adds nodes, it never removes nodes.
BThere are pods with <code>podDisruptionBudget</code> preventing eviction on those nodes.
CNodes with low usage are automatically removed by Kubernetes, no need for Cluster Autoscaler.
DCluster Autoscaler requires manual approval to remove nodes.
Attempts:
2 left
💡 Hint

Think about what prevents pods from being moved or deleted.

🔀 Workflow
expert
3:00remaining
Order the steps to enable Cluster Autoscaler on a new Kubernetes cluster

Put the steps in the correct order to enable Cluster Autoscaler on a new Kubernetes cluster.

A1,2,3,4
B3,1,2,4
C2,1,3,4
D1,3,2,4
Attempts:
2 left
💡 Hint

Think about what must exist before deploying Cluster Autoscaler and configuring it.