Pod Management & Scheduling Flashcards
7 cards from real KCNA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Pod Management & Scheduling flashcards as text
Which field in a container spec sets environment variables from all keys in a ConfigMap?
Answer: envFrom with configMapRef
`envFrom` with a `configMapRef` injects all key-value pairs from a ConfigMap as environment variables into the container.
A node is tainted with `key=value:NoSchedule`. Which pod spec element allows a pod to be scheduled on that node?
Answer: tolerations
A toleration matching the taint's key, value, and effect allows the pod to be scheduled on the tainted node.
What is the default behavior when a liveness probe fails repeatedly?
Answer: The container is killed and restarted according to the restartPolicy
When a liveness probe fails beyond `failureThreshold`, Kubernetes kills the container and restarts it per the pod's restartPolicy.
Which Pod QoS class is assigned when a container has no resource requests or limits defined?
Answer: BestEffort
Pods with no resource requests or limits are classified as BestEffort, the lowest QoS class, and are first to be evicted under pressure.
How does Kubernetes handle a static pod if its defining manifest file is deleted from the node?
Answer: The kubelet deletes the running pod automatically
The kubelet watches the staticPodPath directory and deletes any running static pod whose manifest file is removed.
Which resource type ensures exactly one pod runs on every (or selected) node in the cluster?
Answer: DaemonSet
A DaemonSet places one pod per matching node and automatically adds pods to new nodes as they join the cluster.
What does the `kubectl taint nodes node1 key=val:NoExecute` command do to already-running pods without a matching toleration?
Answer: They are evicted from the node immediately
The `NoExecute` taint effect evicts existing pods that lack a matching toleration, not just prevents new scheduling.