Key Concepts
StatefulSet
Stable Identity
Headless Service
VolumeClaimTemplate
Required Permissions
StatefulSet Status Values
StatefulSet Metrics
How to View StatefulSets
Select Cluster
Select Namespace
Filter and Search
How to View StatefulSet Details
Find the StatefulSet
Click StatefulSet Name
Review Details
- Pod status and ordinal indices
- Container specifications
- Headless service name
- Volume claim templates
- Update strategy configuration
How to Scale a StatefulSet
Find the StatefulSet
Open Actions Menu
Click Scale
Set Replica Count
Apply
- Scale up: New pods are created in order (pod-0, pod-1, pod-2…)
- Scale down: Pods are terminated in reverse order (highest ordinal first)
- Each pod must be Running and Ready before the next is created/terminated
How to Restart a StatefulSet
Restart triggers a rolling restart of all pods.Find the StatefulSet
Open Actions Menu
Click Restart
Monitor
How to Create a StatefulSet
Click Create StatefulSet
Write YAML
serviceNamepointing to a headless servicevolumeClaimTemplatesif persistent storage is needed
Select Namespace
Create
How to Edit a StatefulSet
Open Actions Menu
Click Edit YAML
Modify Spec
- Container image (triggers rolling update)
- Resource requests/limits
- Environment variables
- Replica count
Save
How to Delete a StatefulSet
Open Actions Menu
Click Delete
Confirm
Update Strategies
StatefulSets support two update strategies:- Pods with ordinal >= partition are updated
- Pods with ordinal < partition are not updated
- Useful for canary deployments
Pod Management Policy
Troubleshooting
StatefulSet stuck in Updating
StatefulSet stuck in Updating
- A pod may be failing readiness checks
- Check pod events and logs for errors
- Verify PVC is bound and storage is available
- Check if previous pod terminated cleanly
Pods not starting in order
Pods not starting in order
- Previous pod must be Running and Ready first
- Check pod events for scheduling issues
- Verify PVC binding if using persistent storage
- Check headless service exists and selectors match
PVC not being created
PVC not being created
- Verify
volumeClaimTemplatesis correctly defined - Check StorageClass exists and is default or specified
- Verify storage provisioner is working
- Check for quota limits on PVCs
Data lost after pod restart
Data lost after pod restart
- Ensure PVC is correctly mounted in pod spec
- Verify data is written to the mounted path, not container filesystem
- Check PVC still exists and is bound
Cannot connect to pods via headless service
Cannot connect to pods via headless service
- Verify headless service has
clusterIP: None - Check service selector matches pod labels
- Use full DNS name:
pod-0.service-name.namespace.svc.cluster.local - Verify pods are Ready
Scale down not deleting pods
Scale down not deleting pods
- Pods are deleted in reverse order, one at a time
- Each pod must terminate before the next begins
- Check for pods stuck in Terminating state
- Verify no finalizers blocking deletion
FAQ
What's the difference between StatefulSet and Deployment?
What's the difference between StatefulSet and Deployment?
Why do StatefulSets need a headless service?
Why do StatefulSets need a headless service?
mysql-0.mysql.default.svc.cluster.local). This allows clients to connect to specific pods by name, which is essential for stateful applications.Are PVCs deleted when I delete a StatefulSet?
Are PVCs deleted when I delete a StatefulSet?
How do I perform a canary update?
How do I perform a canary update?
partition field in RollingUpdate strategy. Set partition to N to only update pods with ordinal >= N, leaving lower ordinals on the old version for testing.Can I scale a StatefulSet to zero?
Can I scale a StatefulSet to zero?
Why are pods created one at a time?
Why are pods created one at a time?
How do I update the volumeClaimTemplate?
How do I update the volumeClaimTemplate?
What happens to my data if a node fails?
What happens to my data if a node fails?