kubectl logs -p pod名称

-p:previous,上一个,前一个。

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

如果容器的前一个实例存在,则在pod中打印它的日志。

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐