k8s 常用命令
-
进入pod的docker
kubectl exec -it <pod-name> -n <namespace> -c <container-name> -- /bin/bash
查询rook的mon 端点
kubectl -n rook-ceph get configmap rook-ceph-mon-endpoints -o yaml | grep data -
重启dns
kubectl delete pods -n kube-system -l k8s-app=kube-dns -
To get the process ID of either container, take note of the container ID or name, and use it in the following docker command:
docker inspect --format '{{ .State.Pid }}' container-id-or-name -