Courseiva

CKA Practice Question: Cluster Architecture, Installation and Configuration

You need to prepare a worker node for maintenance. Which TWO actions should you perform? (Choose TWO.)

⚠ Common exam trap

A common mix-up: candidates think `kubectl cordon` alone is sufficient for maintenance, but it only prevents new scheduling—it does not evict existing pods, so you must also drain the node to safely move workloads off.

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

`kubectl drain` safely evicts all pods from a node before maintenance, and the `--ignore-daemonsets` flag is necessary because DaemonSet pods cannot be evicted (they are managed by the node controller). Option D is correct because `kubectl cordon` marks the node as unschedulable, preventing new pods from being scheduled onto it, which is a prerequisite before draining to avoid race conditions.

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 delete node <node>

    Why it's wrong here

    kubectl delete node <node> permanently removes the specified node resource from the Kubernetes cluster's control plane. This action is irreversible and signifies the complete decommissioning of a node, not a temporary state for maintenance preparation. While it prevents pods from being scheduled, it does so by eliminating the node's existence within the cluster, which is far more drastic than merely preparing it for a service window. This command would lead to data loss for any pods running on local storage and require re-adding the node if it were to return.

  • kubectl uncordon <node>

    Why it's wrong here

    kubectl uncordon <node> is used to revert a node's status from "unschedulable" back to "schedulable," allowing the Kubernetes scheduler to place new pods onto it. This command is typically executed *after* maintenance activities are completed and the node is deemed ready to resume normal operations. Applying `uncordon` during the preparation phase would counteract the goal of preventing new workloads and ensuring the node is clear for servicing, making it an inappropriate action for initial maintenance preparation.

  • kubectl drain <node> --ignore-daemonsets

    Why this is correct

    kubectl drain <node> --ignore-daemonsets is a crucial command for preparing a node for maintenance. It safely evicts all user-managed pods from the specified node, relocating them to other available nodes in the cluster. The `--ignore-daemonsets` flag is essential because DaemonSets are designed to run one pod per node, and attempting to evict them would be futile and prevent the drain operation from completing. This ensures the node is clear of application workloads while allowing critical cluster services managed by DaemonSets to remain, facilitating a smooth maintenance window.

  • kubectl cordon <node>

    Why this is correct

    kubectl cordon <node> marks the specified node as "unschedulable" in the Kubernetes control plane. This action immediately prevents the scheduler from placing any *new* pods onto the node, effectively stopping new workloads from starting there. It is a fundamental first step in preparing a node for maintenance, ensuring that the node's workload does not increase before existing pods are safely removed. Cordoning does not affect pods already running on the node, which is why draining is a subsequent necessary step.

  • kubectl taint nodes <node> key=value:NoSchedule

    Why it's wrong here

    kubectl taint nodes <node> key=value:NoSchedule adds a taint to the node, which prevents pods without a matching toleration from being scheduled onto it. While this can prevent new pods, it is not the standard or most direct method for preparing a node for maintenance. Taints are primarily used for specialized scheduling policies, such as dedicating nodes to specific workloads, rather than temporarily taking a node out of service. The standard `cordon` and `drain` commands are specifically designed for this maintenance workflow, offering a more explicit and universally understood approach for temporary node removal.

About these practice questions

This CKA question is part of Courseiva's 302-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKA practice question is part of Courseiva's free CNCF 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 CKA exam.