k8s-storage-troubleshooting
Kubernetes storage troubleshooting
Find out why a volume does not get to a pod, or why it does not work once it is there, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.
Volumes hold data, and many storage changes cannot be undone: a volume cannot shrink, a deleted claim can take its data with it, and most of a claim's spec cannot change after it is created. So most fixes here are proposed fixes, with the reason said.
The commands use placeholders: my-namespace, my-app, my-pod, my-data (the PVC),
my-pv, my-class and my-node. Replace them with the real names. Never read Secrets
(a StorageClass or CSI driver may reference some; read their names only). If output
contains passwords, tokens or keys, do not repeat them.