CertKeen

Certified Kubernetes Administrator (CKA) · Free practice question 1 of 12

Drain flags for DaemonSets and emptyDir

Before kernel patching, an operator at Brackwater Shipping runs kubectl drain on node n-14. It refuses because the node hosts a logging DaemonSet pod and a pod using a local scratch volume. Which TWO flags let the drain proceed? (Select TWO.)

  1. A.--ignore-daemonsets
  2. B.--keep-volumes
  3. C.--evict-statics
  4. D.--delete-emptydir-data
  5. E.--skip-pdb
Show answer and explanation

Correct answers: A. --ignore-daemonsets · D. --delete-emptydir-data

Why: DaemonSet-managed pods would be re-created on the same node right away, so drain skips them only when --ignore-daemonsets is given. Pods with emptyDir volumes lose that data on eviction, so drain needs --delete-emptydir-data to confirm. The other flags are not kubectl drain options; static pods are never evicted by drain.

More free Certified Kubernetes Administrator (CKA) questions