k8s查看指定pods里面的容器
kubectl get pods empty-dir-pd -o jsonpath={.spec.containers[*].name} -n namespace
例子:
[root@k8s-master 11:46:01~/kubernets/nfs]# kubectl get pods empty-dir-pd -o jsonpath={.spec.containers[*].name} -n default nginx-emptydir01 nginx-emptydir02