9 Stateful Applications

 

This chapter covers

  • How to attach persistent disk storage to Pods
  • How the Kubernetes concepts of volumes, PersistentVolumes, PersistentVolumeClaims and StorageClasses interact to give you stateful capabilities
  • Creating a simple single-Pod deployment with persistent state
  • Deploying a complex multiple-Pod stateful application with multiple roles
  • Migrating and recovering data by re-linking Kubernetes objects to the underlying disk resources

Stateful applications, ones that have attached storage, finally have a home with Kubernetes. While stateless applications are lauded for their high scalability, and not needing to manage attached storage helps with that, they are not the only way to deploy software. Whether you’re deploying a sophisticated database or are migrating an old stateful application from a VM, Kubernetes has you covered.

Using Persistent Volumes, you can attach stateful storage to any Kubernetes Pod. When it comes to multi-replica deployments, just as Kubernetes offers Deployment as a high-level construct for managing a stateless application, StatefulSet exists to provide high-level management of stateful applications.

9.1 Volumes, Persistent Volumes, Claims and Storage Classes

 
 
 
 

9.1.1 Volumes

 
 

9.1.2 Persistent Volumes and Claims

 
 
 

9.1.3 Storage Classes

 

9.1.4 Single-pod Stateful Workload Deployments

 
 
 
 

9.2 StatefulSet

 
 

9.2.1 Deploying StatefulSet

 
 
 

9.2.2 Deploying a Multi-Role StatefulSet

 
 
 

9.3 Migrating/Recovering Disks

 

9.4 Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest