打开kubectl详细日志模式,查看命令运行背后的详细日志

打开kubectl详细日志模式,查看命令运行背后的详细日志

[root@xxx ~]# kubectl get pods --v 6
I0927 17:12:59.277922   26632 loader.go:359] Config loaded from file /root/.kube/config
I0927 17:12:59.346606   26632 round_trippers.go:438] GET https://192.168.x.x:6443/api/v1/namespaces/default/pods?limit=500 200 OK in 26 milliseconds
I0927 17:12:59.350004   26632 get.go:570] no kind is registered for the type v1beta1.Table in scheme "k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:29"
NAME                            READY   STATUS    RESTARTS   AGE
centos                          1/1     Running   0          2d7h

使用--v 6选项会提高日志级别使得所有kubectl发起的到API服务器请求都会被输出

你可能感兴趣的:(Kubernetes)