When Your Container Won’t Start: The Architecture Mismatch Mystery


A few days ago, I was finishing up what seemed like a routine deployment. Image built? Check. Kubernetes manifest ready? Check. Straightforward stuff. But the moment I hit apply, my pods just refused to start. Instead of my application's friendly welcome message, I was greeted by a wall of errors and a creeping sense of déjà vu.
It brought back memories of the first time I tried to run a fancy new project from GitHub on my Raspberry Pi. Nothing worked. Was it user error? Did I miss a step? Turns out, the answer was so fundamental I completely overlooked it: a mismatch between my device’s architecture (ARM) and the container image I pulled (built for x86/amd64).
How Architecture Mismatches Happen
Each container image is tied to a specific CPU architecture, such as amd64
,arm64
or even others. If the machine running your container doesn’t match the image’s architecture, that container simply can’t run.
This catches even seasoned engineers off guard, especially when using continuous integration pipelines or cloud platforms that might default to building for one architecture but scheduling to another.
Spotting the Symptoms
1. Kubernetes and Docker Error Messages
Kubernetes Pod Stuck in CrashLoopBackOff or CreateContainerError
Docker
standard_init_linux.go:219: exec user process caused: exec format error
In pod or container runtime events
OCI runtime create failed: exec format error
Even if your image was built “successfully”, if you see these errors and your code runs fine elsewhere, you might be facing an architecture mismatch.
2. Check the Node and Image Architecture
Find Node Architecture:
In Kubernetes
kubectl get nodes -o wide
Look at the OS-IMAGE
, ARCHITECTURE
, or LABELS
columns. Often, you’ll see nodes labeled as kubernetes.io/arch=arm64
or amd64
.
Check Container Image Architecture:
docker manifest inspect <image>
This will show the supported architectures for a multi-platform image.
How to avoid or fix it?
Always Build or Select Images for the Target Architecture
If deploying to ARM, build or choose “arm64” images.
Multi-architecture Builds
Tools like Docker Buildx let you build multi-platform images
docker buildx build --platform linux/amd64,linux/arm64 -t yourrepo/yourapp:latest --push .
Pin Images in Kubernetes
When using public images, check the tags and documentation for architecture support. Some images now use “fat manifests” (multi-arch).
Use Node Affinity for Architecture
In your Kubernetes manifest
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
Final Thoughts
If containers run perfectly locally, but fail out in production, stop and check if your image and host architecture agree. An “exec format error” is architecture’s way of telling you two worlds just can’t talk.
Fight the mystery by always double-checking your platform tags
Keep shipping !
Subscribe to my newsletter
Read articles from Muskan Agrawal directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Muskan Agrawal
Muskan Agrawal
Cloud and DevOps professional with a passion for automation, containers, and cloud-native practices, committed to sharing lessons from the trenches while always seeking new challenges. Combining hands-on expertise with an open mind, I write to demystify the complexities of DevOps and grow alongside the tech community.