Skip to content

Commit 6a4e10d

Browse files
authored
Create k8s命令
1 parent 2f8c722 commit 6a4e10d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

k8s命令

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
K8S进入容器方法
2+
前言
3+
k8s如何进入一个pod里有多个容器的方法
4+
方法1
5+
kubectl --namespace=kube-system exec -it kube-dns-1336009800-15b1h --container nginx -- sh
6+
7+
kubectl --namespace=kube-system exec -it kube-dns-1336009800-15b1h -c nginx -- sh
8+
注释:--namespace 为命名空间kube-dns为pod的名字,-c或-container为Pod里其中的一个容器名字

0 commit comments

Comments
 (0)