I have an error in my Kubernetes cluster that seems weird.
I have a few pods that for some reason are stuck in CrashLoopBackOff
state ( it is changing every time I try to install it from scratch )
when I try to do docker logs on the pod I get this error: standard_init_linux.go:178: exec user process caused "exec format error"
I read that it means the docker-entrypoint is not good but after 3-4 times of retries ( each retry I scale down the deployment , delete the image , pulls it back from registry and scales up ) it works on it's own.
if I pull the same image to a different docker host and tried docker run -it <id> /bin/bash
it works.
I tried to save it : docker save 01b2a03cb2a4 > /dev/null && echo 'OK' || echo 'Corrupted'
and I get corrupted: Error response from daemon: file integrity checksum failed for "/Dockerfile"
any help would be great
First of all, try to solve CrashLoopBackOff
. Maybe your pod is executing a CMD which ends or exits, so, try adding to your Dockerfile:
#Dockerfile
[...]
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
Second, post your Dockerfile to know this integrity error, please, and I'll edit this.
you can try those images.
# docker rmi
use this command to remove images. and pull new images.