ExamPilot Global home

CKA lab · Prepare a worker node for maintenance

A lab worker must be marked unschedulable before maintenance.

ExamPilot graduation owl

Initial conditions

Use a disposable multi-node cluster. Pick a non-control-plane worker with spare scheduling capacity elsewhere. Replace WORKER with its actual name.

Objective

Cordon the worker. Inspect the Pods on it and practise a dry run of an eviction. Restore scheduling after the exercise.

Hint

Respect disruption budgets and investigate local storage before attempting real eviction.

Solution commands

kubectl cordon WORKER
kubectl get pods -A --field-selector spec.nodeName=WORKER
kubectl drain WORKER --ignore-daemonsets --dry-run=server
kubectl uncordon WORKER

Validate the result

kubectl get node WORKER -o jsonpath="{.spec.unschedulable}"

Cordon prevents new ordinary workloads scheduling without evicting existing Pods. Drain dry-run output can reveal workload limitations. After uncordon, unschedulable should be false or unset.

Common mistakes

Draining the control plane or forcing eviction without checking disruption constraints can interrupt workloads.

Free official documentation · Verified 26 November 2026

Use your own disposable Kubernetes environment.