{"record":{"id":"c50ef43ec1557f76","repo":"derailed/k9s","slug":"unexpected-status-s","errorCode":null,"errorMessage":"unexpected status %s","messagePattern":"unexpected status (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/render/pvc.go","lineNumber":104,"sourceCode":"\tr.Fields = model1.Fields{\n\t\tpvc.Namespace,\n\t\tpvc.Name,\n\t\tstring(phase),\n\t\tpvc.Spec.VolumeName,\n\t\tcapacity,\n\t\taccessModes,\n\t\tclass,\n\t\tmapToStr(pvc.Labels),\n\t\tAsStatus(p.diagnose(string(phase))),\n\t\tToAge(pvc.GetCreationTimestamp()),\n\t}\n\n\treturn nil\n}\n\nfunc (PersistentVolumeClaim) diagnose(r string) error {\n\tif r != \"Bound\" && r != \"Available\" {\n\t\treturn fmt.Errorf(\"unexpected status %s\", r)\n\t}\n\treturn nil\n}\n","sourceCodeStart":86,"sourceCodeEnd":108,"githubUrl":"https://github.com/derailed/k9s/blob/2d3ccc6ba2ce98c3781bfc441bb3e884f072774f/internal/render/pvc.go#L86-L108","documentation":"PersistentVolumeClaim.diagnose is the VALID-column health check: it accepts only the strings 'Bound' and 'Available' and returns 'unexpected status <phase>' for anything else, rendered via AsStatus. Since a PVC's actual phases are Bound, Pending and Lost — 'Available' is a PV phase, not a PVC one — every Pending or Lost claim shows this diagnostic. It reports cluster state (the claim is not usable yet) and never leaves Render as an error.","triggerScenarios":"Opening the PVC view while a claim is Pending (no matching StorageClass, WaitForFirstConsumer binding waiting for a consumer pod, capacity or topology limits unmet) or Lost (its bound PV disappeared). Any phase string other than Bound/Available trips the check.","commonSituations":"Deploying a workload before its StorageClass exists; storageClassName typo or missing default class; WaitForFirstConsumer claims with no consumer scheduled; deleted PV leaving the claim Lost.","solutions":["Run kubectl describe pvc <name> and read Events for the exact binding failure","Fix spec.storageClassName (create the class or correct the name) so a PV can be provisioned","For WaitForFirstConsumer claims, start the consuming pod so provisioning begins","For Lost claims, recreate the claim after restoring or removing the underlying PV"],"exampleFix":"# before: PVC Pending, storageClassName references a missing class\nkubectl get pvc myclaim -o jsonpath='{.status.phase}'\n# Pending\n# after: point at an existing class so binding proceeds\nkubectl patch pvc myclaim -p '{\"spec\":{\"storageClassName\":\"standard\"}}'","handlingStrategy":"validation","validationCode":"# find claims that will show the diagnostic\nkubectl get pvc -A --field-selector=status.phase=Pending\nkubectl get pvc -A --field-selector=status.phase=Lost","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Create the StorageClass before claims that reference it","Verify storageClassName spelling in manifests and set a default class","Expect Pending with WaitForFirstConsumer until the consumer pod schedules","Read the VALID column as cluster status; investigate with kubectl describe pvc"],"tags":["kubernetes","storage","pvc","cluster-state","health","k9s"],"backgroundTag":null,"analyzedSha":"2d3ccc6ba2ce98c3781bfc441bb3e884f072774f","analyzedAt":"2026-08-15T16:09:14.432Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}