Interview Prep/Kubernetes/Cluster operations: certs, drains, rollouts and quotas

`kubectl drain` stops with `cannot delete DaemonSet-managed Pods (use --ignore-daemonsets to ignore)` and `cannot delete Pods with local storage (use --delete-emptydir-data to override)`.

BeginnerTroubleshootingCluster operations: certs, drains, rollouts and quotas
Answer

Likely causes → Drain safety checks. DaemonSet Pods would be recreated on the same node anyway, and emptyDir data is lost when the Pod moves. Bare Pods with no controller (cannot delete Pods that declare no controller) would not be recreated at all.

Diagnose →

kubectl get pods -A --field-selector spec.nodeName=ip-10-0-1-5 -o wide

Fix →

kubectl drain ip-10-0-1-5 --ignore-daemonsets --delete-emptydir-data --timeout=10m

Use --force for bare Pods only after confirming nobody needs them.

Prevent → No bare Pods in production; treat emptyDir as scratch only.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Cluster operations: certs, drains, rollouts and quotas