is shared across replicas • DaemonSets ◦ Workloads that run on each node in the cluster • Jobs ◦ A workload that needs to run to completion • CronJobs ◦ Workloads that need to run to completion on a time-based schedule • StatefulSets ◦ Volume per replica, more sticky/persistent identity
Pods, and provides guarantees about the ordering and uniqueness of these Pods. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of its Pods. Useful for workloads that require: • Stable, unique network identifiers. • Stable, persistent storage. • Ordered, graceful deployment and scaling. • Ordered, automated rolling updates.
consistent identity ◦ Often for connection to other services • High & Consistent Availability ◦ Upgrades must be handled gracefully and carefully ◦ This needs to be up and ready before that ◦ Stateful workloads often have complex start and end processes
Pod topology spreading • Workload isolation for critical workloads ◦ Node Affinity, Taints/Tolerations ◦ Pod Priority and Preemption ◦ Pod Resources and QoS
aforementioned features! • Blue/green strategies for upgrades • Chaos testing • Take regular backups ◦ Backups of the data ◦ Backups of the config • Actually test your recovery procedures! • CI/CD best practices apply • General Kubernetes best practices around security and networking apply
a workload as stateful if something cares about its state in some form (not just data!) Kubernetes provides primitives for app lifecycle, storage, scheduling, and graceful disruption management. Look for these types of features for your stateful needs! A good quality operator can simplify and manage complex day 2 workflows Design your application with modern best practices