Docker & Kubernetes · Module 09
Kubernetes Workloads
Pick the right workload: ReplicaSets keep a pod count, Deployments update and roll back, DaemonSets run on every node, StatefulSets keep identity, Jobs/CronJobs run tasks.
What you will learn
- Explain pod templates, selectors and how a ReplicaSet keeps the pod count
- Create, update, scale and roll back Deployments
- Use DaemonSets with nodeSelector for per-node services
- Use StatefulSets with a headless Service and volumeClaimTemplates
- Run one-off and scheduled tasks with Jobs and CronJobs
Lessons
- Pod templates, ReplicationControllers and ReplicaSets
A ReplicaSet keeps the right number of pods matching its selector, creating them from a pod template; it is usually used through a Deployment.
- Deployments — rolling updates, rollbacks, scaling
A Deployment manages ReplicaSets to update pods gradually, keep a revision history and roll back at any time.
- DaemonSets
A DaemonSet runs exactly one pod on every eligible node; ideal for log, monitoring and networking agents.
- StatefulSets and headless Services
A StatefulSet gives each pod a stable identity — ordered name, own DNS, own PVC — for stateful applications.
- Jobs, CronJobs and Operators
A Job runs pods to completion; a CronJob creates Jobs on a cron schedule (UTC by default); an Operator is a custom controller for complex apps.