13: StatefulSets

In this chapter, you’ll learn how to use StatefulSets to deploy and manage stateful applications on Kubernetes.

For the purposes of this chapter, we’re defining a stateful application as one that creates and saves valuable data. Examples include databases, key-value stores, and applications that save data about client sessions and use it for future sessions.

We’ll divide the chapter as follows:

  • StatefulSet theory
  • Hands-on with StatefulSets

The theory section introduces how StatefulSets work and what they offer stateful applications. But don’t worry if you don’t understand everything at first, you’ll cover it all again in the hands-on section.

StatefulSet theory

It’s helpful to compare StatefulSets with Deployments. Both are ...

Get The Kubernetes Book - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.