Statefulsets

Step 1: Apply the PV Configuration

kubectl apply -f 01counter-pv.yaml

Step 2: Create a PVC

kubectl apply -f 02counter-pvc.yaml

Step 3:

kubectl apply -f 03satefulset.yaml

Step 4: Now lets try to scale the statefulset and see

kubectl scale statefulsets counter-statefulset --replicas=3

Observe 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 default
kubectl delete pvc --all
kubectl delete pv --all

Last updated

Was this helpful?