I got Pod errors: CrashLoopBackOff from kubernetes

4/23/2018

I was trying to run simple python file on kubenetes engine. while i got following error message "Pod errors: CrashLoopBackOff". How to fix this issue?

-- Anu V
docker
google-kubernetes-engine
kubernetes

2 Answers

5/31/2018

Just modify your deployment as follows:

   spec:
     containers:
     - image: YOUR_IMAGE
       name: NAME
       tty: true     #add this line
-- suren
Source: StackOverflow

5/17/2018

The issue caused by the docker container which exits as soon as the "start" process finishes. Add a command that runs forever and probably it'll work. For example, recreating docker image:

#Dockerfile
[...]
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
-- mulg0r
Source: StackOverflow