{"record":{"id":"d6fca3ab508446ce","repo":"GoogleContainerTools/skaffold","slug":"statuscheck-internal-error","errorCode":"STATUSCHECK_INTERNAL_ERROR","errorMessage":"%d/%d deployment(s) failed","messagePattern":"(.+?)/(.+?) deployment\\(s\\) failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/kubernetes/status/status_check.go","lineNumber":454,"sourceCode":"\t\t\t\t}\n\t\t\t\tr.MarkComplete()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc getSkaffoldDeployStatus(ctx context.Context, c *counter, sc proto.StatusCode) (proto.StatusCode, error) {\n\tif c.total == int(c.cancelled) && c.total > 0 {\n\t\terr := fmt.Errorf(\"%d/%d deployment(s) status check cancelled\", c.cancelled, c.total)\n\t\treturn proto.StatusCode_STATUSCHECK_USER_CANCELLED, err\n\t}\n\t// return success if no failures find.\n\tif c.failed == 0 {\n\t\treturn proto.StatusCode_STATUSCHECK_SUCCESS, nil\n\t}\n\t// construct an error message and return appropriate error code\n\terr := fmt.Errorf(\"%d/%d deployment(s) failed\", c.failed, c.total)\n\tif sc == proto.StatusCode_STATUSCHECK_SUCCESS || sc == 0 {\n\t\tlog.Entry(ctx).Debugf(\"found statuscode %s. setting skaffold deploy status to STATUSCHECK_INTERNAL_ERROR.\", sc)\n\t\treturn proto.StatusCode_STATUSCHECK_INTERNAL_ERROR, err\n\t}\n\tlog.Entry(ctx).Debugf(\"setting skaffold deploy status to %s.\", sc)\n\treturn sc, err\n}\n\nfunc getDeadline(d int) time.Duration {\n\tif d > 0 {\n\t\treturn time.Duration(d) * time.Second\n\t}\n\treturn DefaultStatusCheckDeadline\n}\n\nfunc (s *monitor) printStatusCheckSummary(out io.Writer, r *resource.Resource, c counter) {\n\tae := r.Status().ActionableError()\n\tif r.StatusCode() == proto.StatusCode_STATUSCHECK_USER_CANCELLED {","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/status/status_check.go#L436-L472","documentation":"After watching all deployments, Skaffold found at least one whose status check failed. It builds this '%d/%d deployment(s) failed' message and returns STATUSCHECK_INTERNAL_ERROR (or a more specific code if one was recorded). This is the definitive 'your deployment is not healthy' signal from the status checker.","triggerScenarios":"`skaffold deploy`/`run`/`dev` completes the deploy step, then during the status check one or more Deployments fail to become Available within the deadline — e.g. CrashLoopBackOff, unschedulable pods, failing readiness probes — so c.failed > 0.","commonSituations":"Bad image/tag pushed to the cluster; insufficient CPU/memory causing Pending pods; misconfigured liveness/readiness probes; missing ConfigMaps/Secrets crashing containers; imagePullBackOff from registry auth problems.","solutions":["Run `kubectl describe deployment <name>` and `kubectl logs` on the pods to find the root cause (crash, probe failure, image pull error)","Fix the manifest causing the unhealthy rollout (correct image tag, resource requests, probe paths, missing secrets/configmaps)","Increase deploy.statusCheckDeadlineSeconds if the deployment is healthy but slower than the deadline","Re-run `skaffold deploy` after fixing and confirm `kubectl rollout status` passes"],"exampleFix":"// before (manifest)\nreadinessProbe:\n  httpGet:\n    path: /wrongpath\n    port: 8080\n// after\nreadinessProbe:\n  httpGet:\n    path: /healthz\n    port: 8080","handlingStrategy":"try-catch","validationCode":"// pre-check deployment health before running the status check\nout, err := exec.Command(\"kubectl\", \"get\", \"deployments\", \"-n\", ns, \"--no-headers\").CombinedOutput()\nif err != nil || strings.Contains(string(out), \"0/1\") {\n    log.Printf(\"deployment not ready yet: %s\", out)\n}","typeGuard":null,"tryCatchPattern":"err := runSkaffoldDeploy(ctx)\nif err != nil {\n    var scErr *skaffold.StatusCodeError\n    if errors.As(err, &scErr) && scErr.Code == proto.StatusCode_STATUSCHECK_INTERNAL_ERROR {\n        log.Printf(\"status check failed: %v; inspect pods:\", err)\n        exec.Command(\"kubectl\", \"get\", \"pods\", \"-n\", ns).Run()\n    }\n}","preventionTips":["Validate manifests and probes locally (kubectl apply --dry-run=server) before deploying","Check image tags and registry credentials to avoid ImagePullBackOff","Set resource requests that fit the cluster's allocatable capacity","Watch pod events during deploys to catch CrashLoopBackOff early"],"tags":["kubernetes","status-check","deployment-failed"],"backgroundTag":"deployment-status-check-failed","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"}