Skip to content

Grading Checklist

  • Identifies exit code 127 as "command not found" -- the entrypoint binary does not exist in the container.
  • Explains why logs are empty: the process never starts, so nothing is written to stdout/stderr.
  • Checks kubectl describe pod for container state details including exit code and reason.
  • Investigates the Dockerfile, specifically the COPY or entrypoint instructions in the final stage.
  • Identifies the multi-stage build issue: binary or script not copied to the final image stage.
  • Suggests debugging by running the image interactively: docker run --entrypoint /bin/sh <image>.
  • Recommends using an ephemeral debug container if the image has no shell: kubectl debug.
  • Mentions checking if the entrypoint path in the pod spec matches the actual path in the image.
  • Notes common exit codes: 0=success, 1=general error, 126=permission denied, 127=not found, 137=OOMKilled/SIGKILL.
  • Suggests verifying the image locally before deploying with docker run <image>.
  • Recommends rollback to the previous working image tag as an immediate mitigation.