View log files of crashed pods in kubernetes

后端 未结 4 1867
隐瞒了意图╮
隐瞒了意图╮ 2021-02-01 01:10

Any idea to view the log files of a crashed pod in kubernetes? My pod is listing it\'s state as \"CrashLoopBackOff\" after started the replicationController. I search the availa

4条回答
  •  余生分开走
    2021-02-01 01:49

    Assuming that your pod still exists:

    kubectl logs --previous

    $ kubectl logs -h
    -p, --previous[=false]: If true, print the logs for the previous instance of the container in a pod if it exists.

提交回复
热议问题