Types of Kubernetes Pod Controllers
Most Kubernetes users do not create Pods directly; instead they create a Deployment, CronJob, StatefulSet, or other Controller which manages the Pods for them.
There is a list of most used Pod Controllers:
- ReplicaSet - creates a stable set of pods, all running the same workload. You will almost never create this directly
- Deployment - is the most common way to get your app on Kubernetes. It maintains a ReplicaSet with the desired configuration, with some additional configuration for managing updates and rollbacks
- StatefulSet - is used to manage stateful applications with persistent storage. Pod names are persistent and are retained when rescheduled (app-0, app-1). Storage stays associated with replacement pods, and volumes persist when pods are deleted
- Job - creates one or more short-lived Pods and expects them to successfully terminate
- CronJob - creates Jobs on a schedule
- DaemonSet - ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Common for system processes like CNI, Monitor agents, proxies, etc.