My kubernetes pods keep crashing with “CrashLoopBackOff” but I can't find any log

前端 未结 15 1833
耶瑟儿~
耶瑟儿~ 2020-11-29 22:40

This is what I keep getting:

[root@centos-master ~]# kubectl get pods
NAME               READY     STATUS             RESTARTS   AGE
nfs-server-h6nw8   1/1           


        
15条回答
  •  误落风尘
    2020-11-29 23:14

    In your yaml file, add command and args lines:

    ...
    containers:
          - name: api
            image: localhost:5000/image-name 
            command: [ "sleep" ]
            args: [ "infinity" ]
    ...
    

    Works for me.

提交回复
热议问题