Statefulsets
Step 1: Apply the PV Configuration
kubectl apply -f 01counter-pv.yamlStep 2: Create a PVC
kubectl apply -f 02counter-pvc.yamlStep 3:
kubectl apply -f 03satefulset.yamlStep 4: Now lets try to scale the statefulset and see
kubectl scale statefulsets counter-statefulset --replicas=3Observe the Behaviors of PV, PVC and Pods
Now create new PV's and verify PVC and Pods
Clear Everything in the current namespace
kubectl delete all --all -n defaultkubectl delete pvc --allkubectl delete pv --allLast updated
Was this helpful?