Google ACE Practice Question: Ensuring Successful Operation of a Cloud Solution
You need to drain a GKE node for maintenance, ensuring that daemonsets and pods using emptyDir volumes are handled properly. Which command should you use?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
kubectl drain NODE --ignore-daemonsets --delete-emptydir-data
kubectl drain with flags ignores daemonsets and deletes emptyDir pods.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
kubectl taint nodes NODE key=value:NoSchedule
Why it's wrong here
Tainting a node with `NoSchedule` only prevents new pods that lack a matching toleration from being scheduled onto that node; it has no effect on workloads already running there. Existing pods continue to operate, so the node is not emptied or made safe for maintenance. To drain a node, you must explicitly evict or delete the currently running pods, which this command does not do.
- ✓
kubectl drain NODE --ignore-daemonsets --delete-emptydir-data
Why this is correct
`kubectl drain` gracefully evicts all pods from the node while respecting PodDisruptionBudgets, making the node unschedulable and empty for maintenance. The `--ignore-daemonsets` flag skips DaemonSet-managed pods, which are intended to run on every node and would otherwise block eviction, while `--delete-emptydir-data` allows deletion of pods using emptyDir volumes, which would otherwise prevent the drain from finishing. These flags together ensure the command completes cleanly on nodes with these pod types.
- ✗
kubectl delete node NODE
Why it's wrong here
`kubectl delete node` only removes the Node API object from the cluster control plane; it does not instruct the kubelet on the underlying instance to terminate pods or stop workloads, nor does it release the compute instance for maintenance. Pods on that node become orphaned or are deleted without graceful shutdown, and the kubelet may automatically re-register the node, so this command fails to provide controlled eviction. A proper maintenance procedure requires draining the node first, then optionally deleting the node after it is fully empty.
- ✗
kubectl cordon NODE && kubectl delete pods --all
Why it's wrong here
`kubectl cordon` marks the node as unschedulable but leaves all existing pods running, so an additional deletion step is necessary. However, `kubectl delete pods --all` deletes pods in the current namespace, not specifically pods on the targeted node, and it performs a non-graceful deletion without honoring PodDisruptionBudgets. This sequence can cause unnecessary downtime by removing the wrong pods and still does not systematically empty the target node.
Go deeper
Related to this question
About these practice questions
Courseiva writes every ACE question from scratch — 769 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.