Deploy the StatefulSet
Understand how to deploy StatefulSets in Kubernetes by defining replicas, services, and volume claim templates. Learn how StatefulSets manage ordered pod creation with persistent storage to support stateful applications and how to customize StorageClass settings for your environment.
We'll cover the following...
We'll cover the following...
Now that we have a StorageClass and a headless Service, we can deploy the StatefulSet.
Example
The following YAML is from the sts.yml file and defines the StatefulSet.
There’s a lot to take in, so let’s go through the important parts.
The name of the StatefulSet is
tkb-stsand will be used to name all Pods and associated volumes.Kubernetes will read the
spec.replicasfield and create 3 replicas calledtkb-sts-0, ...