Hands-on task
k8s: StatefulSet with volumes
In /root/sts.yaml there is a StatefulSet db (image postgres, 2 replicas), but with no persistent storage — data will be lost when a pod restarts. Fix the manifest: add volumeClaimTemplates (a PVC data of 1Gi) mounted at /var/lib/postgresql/data.
Edit the file in the Editor tab.
- kubernetes
- statefulset
- volumeclaimtemplates
- pvc
- persistent storage