Pcornel
Containers

Kubernetes Workloads

Cheat sheet · https://pcornel.dk/topic.php?topic=6080

Back to the Topic

Answer

Kubernetes workloads are controllers that manage pods: Deployments (stateless, rolling updates), StatefulSets (stable identity and storage), DaemonSets (one pod per node), Jobs and CronJobs (run to completion).

Remember

Do not create bare pods for services — use a controller so they are recreated. Check the controller's status (replicas, updated, available) and its events.

First checks

  • kubectl get deploy,sts,ds,job -n <ns> — first check for this topic
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl logs <pod> [-c <c>] [--previous] — container logs (incl. previous crash)
  • kubectl get events --sort-by=.lastTimestamp — recent cluster events

Verify in this order

workload spec → controller creates ReplicaSets/pods → scheduler → running → status updated

Where it usually breaks

Common errors include editing controller-owned Pods directly, using Deployment semantics for stateful identity, confusing readiness with rollout completion, blocked rollouts caused by probes/resources, and CronJob concurrency/history behavior that creates unexpected overlap.

Kubernetes Workloads verification boundary matrix

BoundaryInspectHealthy interpretationDo not infer
IntentPodIntended object/scope is explicit and versioned where relevantIntent is already effective
Owning runtime/control planeReplicaSet / DeploymentOwner accepts and reports the expected object stateDownstream dependencies are healthy
Effective stateStatefulSetIndependent read-back matches the intended stateEvery client sees the same result
Consumer outcomeDaemonSetThe original bounded check succeeds in the same time windowProduction correctness outside this scope

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6080

Confirmation

Confirm action

Continue?