{"record":{"id":"f2a3c3284efc8fe5","repo":"GoogleContainerTools/skaffold","slug":"statuscheck-unknown-unschedulable","errorCode":"STATUSCHECK_UNKNOWN_UNSCHEDULABLE","errorMessage":"%s: %s","messagePattern":"%s: %s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/diag/validator/validator.go","lineNumber":233,"sourceCode":"\t// See https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-states\n\tfor _, c := range cs {\n\t\tswitch {\n\t\tcase c.State.Waiting != nil:\n\t\t\treturn extractErrorMessageFromWaitingContainerStatus(po, c)\n\t\tcase c.State.Terminated != nil && c.State.Terminated.ExitCode != 0:\n\t\t\tsc, l := getPodLogs(po, c.Name, proto.StatusCode_STATUSCHECK_CONTAINER_TERMINATED)\n\t\t\treturn sc, l, fmt.Errorf(\"container %s terminated with exit code %d\", c.Name, c.State.Terminated.ExitCode)\n\t\t}\n\t}\n\t// No waiting or terminated containers, pod should be in good health.\n\treturn proto.StatusCode_STATUSCHECK_SUCCESS, nil, nil\n}\n\nfunc getUntoleratedTaints(reason string, message string) (proto.StatusCode, error) {\n\tmatches := taintsRe.FindAllStringSubmatch(message, -1)\n\terrCode := proto.StatusCode_STATUSCHECK_UNKNOWN_UNSCHEDULABLE\n\tif len(matches) == 0 {\n\t\treturn errCode, fmt.Errorf(\"%s: %s\", reason, message)\n\t}\n\tmessages := make([]string, len(matches))\n\t// TODO: Add actionable item to fix these errors.\n\tfor i, m := range matches {\n\t\tif len(m) < 2 {\n\t\t\tcontinue\n\t\t}\n\t\tt := m[1]\n\t\tswitch t {\n\t\tcase v1.TaintNodeMemoryPressure:\n\t\t\tmessages[i] = \"1 node has memory pressure\"\n\t\t\terrCode = proto.StatusCode_STATUSCHECK_NODE_MEMORY_PRESSURE\n\t\tcase v1.TaintNodeDiskPressure:\n\t\t\tmessages[i] = \"1 node has disk pressure\"\n\t\t\terrCode = proto.StatusCode_STATUSCHECK_NODE_DISK_PRESSURE\n\t\tcase v1.TaintNodePIDPressure:\n\t\t\tmessages[i] = \"1 node has PID pressure\"\n\t\t\terrCode = proto.StatusCode_STATUSCHECK_NODE_PID_PRESSURE","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/diag/validator/validator.go#L215-L251","documentation":"This error (code STATUSCHECK_UNKNOWN_UNSCHEDULABLE) is produced when a pod cannot be scheduled and the scheduler's rejection message does not match any known taint pattern Skaffold understands. The scheduler reason and message are passed through verbatim so the underlying scheduling failure is still visible.","triggerScenarios":"getUntoleratedTaints runs taintsRe against the pod event message and finds zero matches; it returns fmt.Errorf(\"%s: %s\", reason, message) with UNKNOWN_UNSCHEDULABLE instead of a specific taint code.","commonSituations":"Insufficient CPU/memory across all nodes; nodeSelector/affinity matching no nodes; pod's PVC not available on any node (volume topology); custom taints with unexpected wording not covered by Skaffold's regex.","solutions":["Read the scheduler message (kubectl describe pod → Events) for the concrete reason (e.g. 'Insufficient cpu', 'node(s) didn't match nodeSelector').","Lower resource requests or add capacity if it is a resources issue (kubectl describe nodes).","Fix nodeSelector/affinity/tolerations so at least one node matches.","If a PVC blocks scheduling, check PV/PVC availability zones and volume node affinity."],"exampleFix":"// before: no node matches\n// nodeSelector: {disktype: ssd} // no such nodes\n// after\n// nodeSelector: {disktype: nvme}","handlingStrategy":"validation","validationCode":"nodes, _ := client.CoreV1().Nodes().List(ctx, metav1.ListOptions{}); for _, n := range nodes.Items { if nodeMatches(pod.Spec.NodeSelector, n.Labels) && taintsTolerated(pod.Spec.Tolerations, n.Spec.Taints) { return nil } }; return errors.New(\"no node satisfies selector/taints/resources\")","typeGuard":"func schedulableSomewhere(nodes []v1.Node, pod v1.Pod) bool { for _, n := range nodes { if fits(n, pod) { return true } } return false }","tryCatchPattern":"code, err := getUntoleratedTaints(reason, msg); if code == proto.StatusCode_STATUSCHECK_UNKNOWN_UNSCHEDULABLE { log.Printf(\"scheduler said: %s: %s\", reason, msg); return suggestFixFromMessage(msg) }","preventionTips":["Keep resource requests realistic; check kubectl describe nodes capacity before large deploys","Test nodeSelector/affinity labels actually exist on nodes","Mirror cluster taints in your deployment tolerations","Pre-flight PVC topology/zone compatibility with node pools"],"tags":["kubernetes","scheduling","unschedulable","pod"],"backgroundTag":"pod-unschedulable","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}