skills/core/pvc-debug/SKILL.md
Diagnose PersistentVolumeClaim failures (Pending PVC, StorageClass not found, PV binding issues, capacity mismatch). Checks PVC, PV, StorageClass, and provisioner events to identify why storage is not available.
npx skillsauth add scitix/siclaw pvc-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When a PVC is stuck in Pending, a pod cannot mount its volume, or storage provisioning fails, follow this flow to identify the root cause.
Scope: This skill is for diagnosis only. Once you identify the root cause, report it to the user and stop. Do NOT attempt to modify PVCs, PVs, or StorageClasses — that should be left to the user or cluster administrator.
kubectl get pvc <pvc-name> -n <ns>
Note the STATUS, VOLUME, CAPACITY, and STORAGECLASS columns.
Bound — PVC is healthy, issue may be elsewhere (pod mount, permissions)Pending — PVC is waiting for a PV to be provisioned or boundLost — The PV the PVC was bound to has been deletedkubectl describe pvc <pvc-name> -n <ns>
Focus on:
kubectl get storageclass
Verify the StorageClass referenced by the PVC exists and note:
If the StorageClass uses WaitForFirstConsumer, the PV will not be provisioned until a pod using the PVC is scheduled to a node.
If the cluster uses pre-created PVs instead of dynamic provisioning:
kubectl get pv
For a PVC to bind to a PV, the PV must:
Available statusstorageClassNameselector labels on the PVCCheck a specific PV:
kubectl describe pv <pv-name>
storageclass.storage.k8s.io "<name>" not found — StorageClass does not existThe PVC references a StorageClass that does not exist in the cluster.
kubectl get storageclass
Advise the user to either create the StorageClass or update the PVC to use an existing one. If no StorageClass is specified in the PVC, it uses the cluster's default StorageClass — check if one is set:
kubectl get storageclass -o jsonpath='{range .items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")]}{.metadata.name}{"\n"}{end}'
waiting for first consumer to be created — WaitForFirstConsumer binding modeThe StorageClass has volumeBindingMode: WaitForFirstConsumer. The PV will not be provisioned until a pod that uses this PVC is scheduled.
This is normal behavior. Check if a pod using the PVC exists and is being scheduled. If the pod is Pending, use the pod-pending-debug skill.
no persistent volumes available for this claim — No matching PVFor static provisioning: no available PV matches the PVC's requirements.
Check the mismatch:
kubectl get pvc <pvc-name> -n <ns> -o jsonpath='storageClass={.spec.storageClassName} capacity={.spec.resources.requests.storage} accessModes={.spec.accessModes[*]}'
kubectl get pv -o custom-columns='NAME:.metadata.name,CAPACITY:.spec.capacity.storage,ACCESS:.spec.accessModes[*],CLASS:.spec.storageClassName,STATUS:.status.phase'
Common mismatches:
The provisioner failed to create a volume. Common provisioner errors:
kubectl get events -n <ns> --field-selector involvedObject.name=<pvc-name> --sort-by='.lastTimestamp'
Advise the user to check the provisioner's logs and the cloud provider's quota/permissions.
Bound but pod cannot mount — Mount failureThe PVC is bound, but the pod cannot mount the volume. Check the pod events:
kubectl describe pod <pod> -n <ns>
Look for FailedMount or FailedAttachVolume events. Common causes:
Lost — Bound PV was deletedThe PV that the PVC was bound to has been deleted or is no longer available.
kubectl get pv
If the PV no longer exists, the data may be lost. Advise the user to check if the underlying storage still exists in the cloud provider and whether it can be recovered.
pod-pending-debug covers PVC issues briefly as a scheduling failure cause. This skill provides deeper PVC-specific diagnosis.<volumeClaimTemplate>-<statefulset>-<ordinal>). Check all of them if a specific replica is failing.kubectl get pvc -n <ns> lists all PVCs in a namespace — useful when you don't know which PVC is problematic.allowVolumeExpansion: true. If a PVC expansion is stuck, check the PVC's conditions: kubectl get pvc <name> -n <ns> -o jsonpath='{.status.conditions}'.testing
Show and ping the gateway of a network interface, on a Kubernetes node or inside a pod's network namespace. Auto-detects the gateway from the routing table (ip -j route), reports interface type (RoCE / Ethernet / IB), and tests reachability with ping. Use for default-route / gateway questions, network reachability checks, RoCE/RDMA data-path validation, and "can this node/pod reach its gateway" investigations.
development
Guide for writing and improving Siclaw skills. Read this when creating or modifying a skill. Covers skill directory layout, SKILL.md format, script execution modes, and best practices.
devops
Retrieve logs from a Kubernetes node. Supports journalctl (systemd units) and file-based logs. Use when you need to inspect node-level logs (containerd, kubelet, etc.). Run via host_script (preferred) or node_script.
development
Guides the user to the Siclaw Web page to manage Skills. Use this guide when the user requests to create, edit, or view a Skill in a Channel conversation.