Explore More on StatefulSets in K8s

Do you have a requirement to deploy a stateful application in your Kubernetes cluster? If yes, then this is the right article for you. Kubernetes has various controllers and the one we are going to be talking about today is StatefulSet Controller which will help us achieve the aforementioned task.

What is a StatefulSet?

Statefulset is a Kubernetes object that deploys and scales a group of Kubernetes pods but so does the deployment. Generally, when we have a deployment, we don’t care how pods are scheduled and what name they get, but in some cases, it is important that pods are deployed in order and have the same name through all the restarts and reschedules. This is where statefulset comes into the picture. Statefulset allocates a sticky identity[ a number starting from 0] to every pod instead of appending a random string to the pod’s name. Every pod in statefulset is started in a sequential order, so if for some reason pod-0 didn’t start, pod-1,2,3 and so on wouldn’t start as well.

Continue reading “Explore More on StatefulSets in K8s”