Dangerous
kubectl delete pvc data-postgres-0 -n stagingcross-platform · bash · Beginner
Deletes the persistent volume claim backing a StatefulSet member. The claim is what binds that pod to its stored data, and with the default reclaim policy the underlying volume is destroyed with it rather than released.
Signals to notice
- deleting a claim destroys the volume under the default reclaim policy
- a StatefulSet member's claim holds that replica's only copy of its data
Think you can spot these under time pressure?
Start TrainingMore Kubernetes
kubectl get pods -n defaultIntermediatekubectl delete namespace productionIntermediatekubectl describe pod web-0Advancedkubectl get secret db-creds -o jsonpath='{.data.password}' | base64 -dExpertkubectl create clusterrolebinding sa-admin --clusterrole=cluster-admin --serviceaccount=default:defaultExpertkubectl auth can-i --list --as=system:serviceaccount:default:defaultNightmare