I got Pod errors: CrashLoopBackOff from kubernetes

后端 未结 2 1993
清歌不尽
清歌不尽 2021-01-29 04:16

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?

2条回答
  •  一向
    一向 (楼主)
    2021-01-29 05:01

    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"
    

提交回复
热议问题