KCA study materials
KCA study resources

KCA: Workloads and Scheduling

KCA · Work through your exam, one topic at a time.

All guide sections

Workloads and Scheduling

Workloads and Scheduling

This domain tests choosing the right controller and controlling placement: Deployments, ReplicaSets, StatefulSets, DaemonSets, Jobs, CronJobs, taints and tolerations, affinity, topology spread, and disruption budgets.

Controllers

Deployments manage ReplicaSets for stateless rolling updates. StatefulSets give stable ordinal names, stable network identities, and ordered rollout, with PersistentVolumeClaims per replica. DaemonSets run one Pod per eligible node. Jobs run to completion with completions and parallelism; CronJobs create Jobs on a schedule. Choose by identity, storage, and completion semantics.

Scheduling controls

Requests drive filtering; affinity, anti-affinity, and topologySpreadConstraints shape placement. Taints repel Pods; tolerations allow but do not guarantee placement. Node selectors are simple label equality. PodDisruptionBudgets limit voluntary evictions during drains, not involuntary node failures. PriorityClasses can preempt lower-priority Pods.

Worked example

A DaemonSet Pod is missing on one node. kubectl describe pod for another node's Pod shows tolerations, but the missing node has taint dedicated=gpu:NoSchedule. The DaemonSet template does not tolerate it. Add a toleration for dedicated=gpu:NoSchedule; the DaemonSet controller creates the Pod. Do not add a nodeSelector unless the workload should also be restricted. Taints filter scheduling; tolerations permit but do not attract.

Traps

StatefulSet Pods are not interchangeable; scaling down removes the highest ordinal. DaemonSet ignores replicas. A Job with restartPolicy: Always is invalid. A toleration without a matching taint has no effect. PDBs do not protect against eviction by a node going offline.