Deployment vs. StatefulSet vs. DaemonSet

The same container image, run by three different controllers. Live view of namespace …, refreshes every 2 s. Every pod counts its own boots in /data — whether that number survives a pod replacement depends on the controller.

Deployment

What you're seeing
  • Cattle: pods are interchangeable; names end in a random hash (<template-hash>-<random>).
  • Storage: emptyDir — a replaced pod starts at boot 1 again.
  • Network: one Service in front of all; the viewer reaches each pod only by its (changing) IP.
  • Order: none — scale-up and rolling updates create several pods at once (surge first, then remove old ones).

StatefulSet

What you're seeing
  • Pets: each pod has a fixed identity -0, -1, -2; a deleted pod comes back with the same name.
  • Storage: its own PVC per pod (volumeClaimTemplates); the boot count keeps rising, and local-path pins the pod to the node that holds its volume.
  • Network: a headless Service gives every pod a stable DNS name — the viewer uses it below.
  • Order: start 0→1→2, each only when the previous is Ready; scale-down and rollouts go 2→1→0. PVCs stay after scale-down and are reattached on scale-up.

DaemonSet

What you're seeing
  • One per node: there is no replica count — the number of pods follows the number of (matching) nodes.
  • Use: node agents — log shippers, metrics exporters, CNI/storage plugins.
  • Storage: emptyDir here (real agents often mount host paths).
  • Order: rollouts replace the pod node by node (maxUnavailable: 1).

PersistentVolumeClaims

PVCPhaseNode (local-path)Mounted by