kubectl logs命令将显示当前容器的日志。当你想知道为什么前一个容器终止时,你想看到的是前一个容器的日志,而不是当前容器的。可以通过添加--previous选项来完成:
$ kubectl logs mypod --previous
作者:小家电维修
相见有时,后会无期。