{"record":{"id":"64a6c5acb26801f8","repo":"GoogleContainerTools/skaffold","slug":"c-message-pod-status-condition-message","errorCode":null,"errorMessage":"c.Message (pod status condition message)","messagePattern":"c\\.Message \\(pod status condition message\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/diag/validator/validator.go","lineNumber":165,"sourceCode":"\t\t// See https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-states\n\t\tstatusCode, logs, err := getContainerStatus(pod, cs)\n\t\tif statusCode == proto.StatusCode_STATUSCHECK_POD_INITIALIZING {\n\t\t\t// Determine if an init container is still running and fetch the init logs.\n\t\t\tfor _, c := range pod.Status.InitContainerStatuses {\n\t\t\t\tif c.State.Waiting != nil {\n\t\t\t\t\treturn statusCode, []string{}, fmt.Errorf(\"waiting for init container %s to start\", c.Name)\n\t\t\t\t} else if c.State.Running != nil {\n\t\t\t\t\tsc, l := getPodLogs(pod, c.Name, statusCode)\n\t\t\t\t\treturn sc, l, fmt.Errorf(\"waiting for init container %s to complete\", c.Name)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn statusCode, logs, err\n\t}\n\n\tif c, ok := isPodStatusUnknown(pod); ok {\n\t\tlog.Entry(context.TODO()).Debugf(\"Pod %q condition status of type %s is unknown\", pod.Name, c.Type)\n\t\treturn proto.StatusCode_STATUSCHECK_UNKNOWN, nil, errors.New(c.Message)\n\t}\n\n\tlog.Entry(context.TODO()).Debugf(\"Unable to determine current service state of pod %q\", pod.Name)\n\treturn proto.StatusCode_STATUSCHECK_UNKNOWN, nil, fmt.Errorf(\"unable to determine current service state of pod %q\", pod.Name)\n}\n\nfunc isPodReady(pod *v1.Pod) bool {\n\tfor _, c := range pod.Status.Conditions {\n\t\tif c.Type == v1.PodReady && c.Status == v1.ConditionTrue {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc isPodNotScheduled(pod *v1.Pod) (v1.PodCondition, bool) {\n\tfor _, c := range pod.Status.Conditions {\n\t\tif c.Type == v1.PodScheduled && c.Status == v1.ConditionFalse {","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/diag/validator/validator.go#L147-L183","documentation":"The pod validator checks pod status conditions; when a pod's status condition type is unknown (isPodStatusUnknown matches), Skaffold surfaces the raw Kubernetes condition message `c.Message` as the error, with status STATUSCHECK_UNKNOWN. This means Kubernetes itself could not determine a concrete pod state (e.g. Pending without a reason, or an unrecognized condition).","triggerScenarios":"getPodStatus encountering a pod whose condition status is Unknown — typically stuck Pending pods, nodes NotReady, kubelet reporting unknown state, or pods scheduled to unreachable nodes.","commonSituations":"Node pressure or kubelet down; cluster upgrades where pod status is temporarily indeterminate; pods in crash-loops that never reach a definitive condition.","solutions":["Run `kubectl describe pod <name>` to inspect the raw condition message and events","Check node health: `kubectl get nodes` and cordon/drain unhealthy nodes","Check kubelet/container runtime on the node the pod is scheduled to","Retry the deploy once the cluster stabilizes — this is often transient"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"kubectl get pod <name> -o jsonpath='{.status.conditions}' | jq .  # inspect conditions before deploying","typeGuard":null,"tryCatchPattern":"err := getPodStatus(ctx, pod)\nif err != nil {\n  // transient cluster state: retry with backoff\n  time.Sleep(5 * time.Second)\n  err = getPodStatus(ctx, pod)\n}","preventionTips":["Monitor node health before/during deploys (kubectl get nodes)","Check kubelet and container runtime health on target nodes","Treat STATUSCHECK_UNKNOWN as transient; use retries with backoff","Use kubectl describe pod to see events that explain the unknown condition"],"tags":["kubernetes","pod-status","diagnostics","skaffold"],"backgroundTag":"pod-status-unknown","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"}