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 purpose of the `topologySpreadConstraints` field in a Pod spec?
Answer: To distribute pods evenly across failure domains such as zones or nodes
`topologySpreadConstraints` lets you control how pods are spread across topology domains to improve availability and balance.
Which HPA metric type allows scaling based on a metric exposed by an external system outside the cluster?
Answer: External
The `External` metric type in HPA enables scaling based on metrics from systems outside the Kubernetes cluster, such as a cloud queue depth.
A pod with `requiredDuringSchedulingIgnoredDuringExecution` node affinity cannot be scheduled if the rule is not satisfied. What happens to the pod?
Answer: It stays Pending until a matching node becomes available
Hard affinity rules (`required...`) cause the pod to remain Pending indefinitely if no node satisfies the constraint.
What does the Cluster Autoscaler do when a node has been underutilized for the scale-down delay period?
Answer: Terminates the node and reschedules its pods elsewhere
Cluster Autoscaler removes underutilized nodes from the node group and reschedules the pods that were running on them.
Which kubectl command removes a taint from a node?
Answer: kubectl taint nodes key=value:Effect-
Appending a `-` at the end of the taint specification in `kubectl taint nodes` removes that taint from the node.
When using pod affinity with `preferredDuringSchedulingIgnoredDuringExecution`, what happens if no node satisfies the preference?
Answer: The pod is scheduled on the best available node without the preference being met
Soft affinity (`preferred...`) is a hint, not a requirement; the scheduler places the pod even if the preference cannot be satisfied.
Which KEDA concept defines the external event source that triggers pod scaling?
Answer: Scaler
In KEDA, a Scaler is the component that connects to an external source (like Kafka or Redis) and reports the current metric value used for scaling decisions.