Correct Answer: kubectl drain <node-name>
'kubectl drain' cordons the node (marks it as unschedulable) and evicts all pods so they can be rescheduled elsewhere. 'kubectl cordon' only marks the node as unschedulable but doe...
Correct Answer
kubectl drain <node-name>
Why This Answer Is Correct
'kubectl drain' cordons the node (marks it as unschedulable) and evicts all pods so they can be rescheduled elsewhere. 'kubectl cordon' only marks the node as unschedulable but does not evict existing pods.
This question evaluates your knowledge of Kubernetes Administration — a core concept tested in cloud certification exams. Understanding Kubernetes Administration is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.
How do you safely drain a node for maintenance without dropping any active connections?
A Kubernetes node has transitioned to the 'NotReady' state, and the status conditions show DiskPressure=True. Which behavior is Kubernetes most likely to perform on this node for non-daemonset pods?
You need to introduce a custom configuration resource type named AppRoute to your cluster, validating its fields (like port must be an integer) before it is persisted in etcd. Which native Kubernetes mechanism should you implement?
You need to grant read-only access to all namespaces in the cluster to a group of developers who authenticate via an OIDC provider. What RBAC configuration is most operationally efficient?