-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Description
Both answers are correct:
kubectl cordon <node-name>kubectl taint nodes <node-name> key=value:NoSchedule
Source: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cordon/
kubernetes-security-kcsa-mock/src/exported-questions/Kubernetes_Cluster_Component_Security.mjs
Lines 1192 to 1220 in d19b43c
"id": 108, "question": "How can you prevent pods from being scheduled on a Kubernetes node?", "options": [ "kubectl cordon <node-name>", "kubectl drain <node-name>", "kubectl taint nodes <node-name> key=value:NoSchedule", "kubectl label nodes <node-name> unschedulable=true", "kubectl delete node <node-name>" ], "correct_answers": [ 2 ], "explanation": "Tainting a node with `kubectl taint nodes <node-name> key=value:NoSchedule` prevents pods without a matching toleration from being scheduled on it. This is a way to mark nodes as unsuitable for certain workloads without completely removing them from the cluster.", "question_type": "single-choice", "domain": "Kubernetes Cluster Component Security", "subdomain": "Kubelet", "sources": [ { "name": "Kubernetes Taints and Tolerations", "url": "https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" }, { "name": "Kubernetes CLI Reference", "url": "https://kubernetes.io/docs/reference/generated/kubectl/commands/taint" } ], "revision": 1, "revision_date": "2025-04-18 18:43:18" },
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels