Interview Kubernetes, Docker, Helm & Podman

How does the Cluster Autoscaler decide to add or remove nodes?

Kubernetes, Docker, Helm & Podman · Basic level

Answer

Cluster Autoscaler adds nodes when Pods are unschedulable because no existing node can fit them, and it removes nodes when they are underutilized and their Pods can be safely moved. It must respect PDBs, scheduling constraints, taints, local storage, and cloud node group limits.

Technical explanation

Scale-up is triggered by unschedulable Pods, not by high node CPU alone.

Scale-down requires Pods to be movable and can be blocked by PDBs, local volumes, affinity, or system pods.

Kubernetes workload controllers encode different lifecycle guarantees: interchangeable replicas, stable identities, node-local agents, or finite tasks.

Storage decisions must align with durability, access mode, zone placement, backup, restore, and failover behavior.

Autoscaling should be designed with metrics, scheduling constraints, PDBs, and node capacity together.

Hands-on example

1. Deploy a workload for this exercise using kubectl apply and a small test image such as nginx, busybox, or a purpose-built app: create unschedulable Pods and observe Cluster Autoscaler scale-up conditions.

2. Inspect ownerReferences, events, Pods, PVCs, PVs, EndpointSlices, and metrics depending on the resource being tested.

3. Create a realistic disruption: delete a Pod, scale replicas, restart a node, fill a queue, or recreate storage attachment in a test environment.

4. Write the runbook entry covering expected behavior, safe rollback, and what alarms should exist.

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Kubernetes, Docker, Helm & Podman interview questions

← All Kubernetes, Docker, Helm & Podman questions