ReplicaSet
defined with fields, including selector that specifies how to identify pods it can acquire, number of replicas should be running. it uses pod template to create new pod.
StatefulSet
workload API object used to manage stateful applications. guarantees ordering and uniqueness of pods. use if you want persistence for workload.
DaemonSet
Ensure that all nodes run a copy of pod. as nodes are added to the cluster.
- running cluster storage daemon
- running a log collection daemon
- running node monitoring
Deployments
You describe desired state and deployment controller changes actual state to desired state at controlled rate. you can define deployments to create new ReplicaSets, or to remove existing deployments and adopt all their .
ReplicaSet vs StatefulSet vs Deployments
ReplicaSets ensure certain amount of pods are running at any given time.
StatefulSets are for ensuring that applications are stable, unique identities are used and have persistent storage.
deployments are higher-level controllers and provide features like rolling updates, rollbacks and declarative management of replica sets