Scheduling and Scaling 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 Scheduling and Scaling flashcards as text
What is the effect of setting `preemptionPolicy: Never` on a PriorityClass?
Answer: Pods with this class will not preempt lower-priority pods even if resources are unavailable
`preemptionPolicy: Never` prevents pods in this PriorityClass from evicting lower-priority pods, though they are still queued ahead of them.
A DaemonSet pod is running on every node. What happens when a new node joins the cluster?
Answer: The DaemonSet controller automatically schedules a pod on the new node
The DaemonSet controller watches for new nodes and automatically creates a pod on each one that matches its selector (or all nodes if no selector is set).
Which resource in Kubernetes allows you to set default CPU and memory requests/limits for containers that don't specify them?
Answer: LimitRange
A LimitRange can define default and maximum resource constraints that are applied to containers in a namespace when none are specified.
What does the `maxSurge` field control in a Deployment's rolling update strategy?
Answer: The maximum number of extra pods that can exist above the desired replica count during an update
`maxSurge` limits how many additional pods can be created beyond the desired count during a rolling update, controlling update speed.
Which condition must be true for the Cluster Autoscaler to add a new node?
Answer: A pod is Pending because no existing node has sufficient resources to schedule it
Cluster Autoscaler triggers scale-up specifically when pods are stuck in Pending state due to insufficient resources on existing nodes.
In a StatefulSet, pods are scheduled with what naming convention?
Answer: -
StatefulSet pods are named with a stable, predictable pattern of `-0`, `-1`, etc., providing identity that persists across rescheduling.
What is the role of `kube-scheduler` in the Kubernetes control plane?
Answer: Watches for unbound pods and assigns them to nodes based on resource availability and constraints
kube-scheduler's sole responsibility is to watch for unscheduled pods and select the best node for each based on filtering and scoring.