Deploying stateful applications
Kubernetes provides a number of controller APIs to manage the deployment of pods within a Kubernetes cluster. Initially designed for stateless applications, these controllers are used to group pods based on need. In this section, we will briefly learn the differences between the following Kubernetes objects – pods, ReplicaSets, deployments, and StatefulSets. In the event of a node failure, individual Pods will not be rescheduled on other nodes. Therefore, they should be avoided when running stateful workloads.
Deployments are used when managing pods, and ReplicaSets when we need to roll out changes to replica Pods. Both ReplicaSets and Deployments are used when provisioning stateless applications. To learn about Deployments, please check the official Kubernetes documentation here: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/.
StatefulSets are another controller that reached a General Availability (GA) milestone...