Deployment vs StatefulSet | Kubernetes StatefulSet simply explained

techworld_with_nana

TechWorld with Nana

Posted on June 6, 2020

Deployment vs StatefulSet | Kubernetes StatefulSet simply explained

While StatefulSet is used for stateful applications, like databases, Deployment component is used to deploy stateless applications. Many web apps fall into this category.

So the question is:

What is the difference between Deployment and StatefulSet components? 馃

Deployment vs StatefulSet component
Pods deployed by Deployment are identical and interchangeable, created in random order with random hashes in their Pod names.

In contrast to that, the Pods deployed by StatefulSet component are NOT identical and deployment is more complex. They each have their own sticky identity, which they keep between restarts and each can be addressed individually. Thus, they can't be created or deleted at the same time or in any order.

How these identities are created and why it's so important, I explain in detail in the below video 馃幀.

You can find the full video here:


I'm happy to connect with you on 馃檪

馃挅 馃挭 馃檯 馃毄
techworld_with_nana
TechWorld with Nana

Posted on June 6, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related