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.)
- A.--ignore-daemonsets
- B.--keep-volumes
- C.--evict-statics
- D.--delete-emptydir-data
- 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
- CronJob concurrencyPolicy Forbid
- Listing cluster-scoped API resources
- Setting the default namespace in a context
- Session affinity by client IP
- Pod dnsPolicy Default versus ClusterFirst
- Raw block volumes with volumeMode
- Debugging a node with kubectl debug
- CreateContainerConfigError from missing ConfigMap
- Approving a client CertificateSigningRequest
- NetworkPolicy ipBlock with except
- Restoring a PVC from a VolumeSnapshot