INFRA-DEVOPS Contents

Workloads: Deployment, Job, DaemonSet, StatefulSet

Choose the right workload type (Deployment/Job/DaemonSet/StatefulSet) and avoid operational traps during upgrades and rollouts.

On this page

Workload Selection (Ops View)

  • Deployment: stateless services; rolling updates.
  • StatefulSet: stable identity + persistent volumes.
  • DaemonSet: one per node (agents, CNI, log collectors).
  • Job/CronJob: batch tasks; retries and backoff.

Operational Gotchas

  • StatefulSet: storage class, PVC binding, and disruption behavior.
  • DaemonSet: node selectors/taints; may block drains if misconfigured.
  • Job: backoff limits; stuck jobs can create node pressure.

Inspect Workloads Quickly

kubectl get deploy,sts,ds,job -A
kubectl describe deploy -n <ns> <name> | sed -n '1,120p'
kubectl describe sts -n <ns> <name> | sed -n '1,160p'
kubectl get pods -n <ns> -o wide

Failure Modes

  • StatefulSet Pending: PVC not bound, zone mismatch, storage quota.
  • DaemonSet missing nodes: taints/tolerations or node selector mismatch.
  • Job retries storm: misconfigured backoff causing cluster load.