K8s Advance
 kubectl inspect volume content
  cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: pvc-inspector
spec:
  containers:
  - image: busybox
    name: pvc-inspector
    command: ["tail"]
    args: ["-f", "/dev/null"]
    volumeMounts:
    - mountPath: /pvc
      name: pvc-mount
  volumes:
  - name: pvc-mount
    persistentVolumeClaim:
      claimName: YOUR_CLAIM_NAME_HERE
EOF
kubectl exec -it pvc-inspector -- sh
$ ls /pvc
kubectl delete pod pvc-inspector
Enjoy Reading This Article?
Here are some more articles you might like to read next: