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

前端 未结 15 1836
耶瑟儿~
耶瑟儿~ 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

    My pod kept crashing and I was unable to find the cause. Luckily there is a space where kubernetes saves all the events that occurred before my pod crashed.
    (#List Events sorted by timestamp)

    To see these events run the command:

    kubectl get events --sort-by=.metadata.creationTimestamp
    

    make sure to add a --namespace mynamespace argument to the command if needed

    The events shown in the output of the command showed my why my pod kept crashing.

提交回复
热议问题