A new image works on laptops but on nodes the Pod crash-loops and logs show only `exec /app/server: exec format error`.
IntermediateTroubleshootingPod startup failures
Answer
Likely causes → CPU architecture mismatch: an arm64 image (built on an Apple Silicon Mac) running on amd64 nodes, or the reverse on Graviton nodes. A script without a shebang gives the same error.
Diagnose →
kubectl get node -L kubernetes.io/arch
docker buildx imagetools inspect registry.example.com/web:1.4
Fix → Build a multi-arch image:
docker buildx build --platform linux/amd64,linux/arm64 -t registry.example.com/web:1.4 --push .
Or pin the workload with nodeSelector: kubernetes.io/arch: amd64. For scripts, add #!/bin/sh as line one.
Prevent → Build images only in CI with explicit --platform, never push from laptops.
More on Pod startup failures
A Pod shows `CrashLoopBackOff` with `RESTARTS 7` and events say `Back-off restarting failed container app`. Where do you start?Beginner`kubectl logs web-0 --previous` returns nothing useful and the container dies in under a second. How do you get inside it?IntermediatePod status is `ImagePullBackOff` and events show `Failed to pull image "registry.example.com/web:1.4.2": rpc error: code = NotFound desc = failed to pull and unpack image ... not found`.BeginnerEvents show `pull access denied for registry.example.com/web, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed`.BeginnerPulls from Docker Hub randomly fail with `toomanyrequests: You have reached your pull rate limit`.IntermediateA private registry with an internal CA fails with `x509: certificate signed by unknown authority` during image pull.Intermediate