-
kubectl describe pod taskcenter-ol-m57rt
- 查看指定 Pod 的详细信息。 -
kubectl describe pod taskcenter-ol-m57rt -n dahuadltp-2
- 查看指定 Namespace 中的 Pod 详细信息。 -
kubectl get pod -n dahuadltp-2 | grep 38438-0bb6c1be-2952-11eb-b5fd-0242ac1e8b04
- 获取指定 Namespace 中名称包含关键字 "38438-0bb6c1be-2952-11eb-b5fd-0242ac1e8b04" 的 Pod 信息。 -
kubectl get pod -A | grep 38438-0bb6c1be-2952
- 获取所有 Namespace 中名称包含关键字 "38438-0bb6c1be-2952" 的 Pod 信息。 -
kubectl get pod -A | grep 38438
- 获取所有 Namespace 中名称包含关键字 "38438" 的 Pod 信息。 -
kubectl get pod 38438-53b28456-2acb-11eb-bf4b-0242ac1e5b04 -n kube-system
- 获取指定 Namespace 中指定 Pod 的信息。 -
kubectl get pod -n kube-system | grep 38438-53b28456-2acb-11eb-bf4b
- 获取指定 Namespace 中名称包含关键字 "38438-53b28456-2acb-11eb-bf4b" 的 Pod 信息。 -
kubectl get pods -o wide -A | grep "27711-3b61bb2a-289a-11eb-8f29-0242ac1e7b1b"
- 获取名称包含关键字 "27711-3b61bb2a-289a-11eb-8f29-0242ac1e7b1b" 的 Pod 信息。 -
kubectl describe nodes 10.30.113.12
- 查看指定 IP 的节点的详细信息。 -
kubectl get pods -o wide -A | grep "[2020/11/17 15:34] 郭华朋: "
- 获取包含特定信息的 Pod 信息。 -
kubectl get pods -o wide -A | grep "27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b"
- 获取名称包含关键字 "27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b" 的 Pod 信息。 -
kubectl describe pod 27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b -n jinn-test-4
- 查看指定 Namespace 中指定 Pod 的详细信息。 -
kubectl describe nodes 10.30.113.11
- 查看指定 IP 的节点的详细信息。 -
kubectl describe pods 27711-0be3a42c-28a8-11eb-8ec4-0242ac1e7b1b
- 查看指定 Pod 的详细信息。 -
kubectl describe pods 27711-0be3a42c-28a8-11eb-8ec4-0242ac1e7b1b -n jinn-test-4
- 查看指定 Namespace 中的 Pod 详细信息。 -
kubectl describe pods 27711-0be3a42c-28a8-11eb-8ec4-0242ac1e7b1b
- 查看指定 Pod 的详细信息。 -
kubectl describe nodes 10.30.113.11
- 查看指定 IP 的节点的详细信息。 -
kubectl describe pods 27711-0be3a42c-28a8-11eb-8ec4-0242ac1e7b1b -n jinn-test-4
- 查看指定 Namespace 中的 Pod 详细信息。 -
kubectl describe nodes 10.30.113.11
- 查看指定 IP 的节点的详细信息。 -
kubectl describe pods 233499-04af570a-287b-11eb-baa5-0242ac1e7b06-85jr5 -n jinn-test-4
- 查看指定 Namespace 中的 Pod 详细信息。 -
kubectl describe nodes 10.30.113.11
- 查看指定 IP 的节点的详细信息。 -
kubectl get svc -n jinn-test-4
- 获取指定 Namespace 中的 Service 信息。 -
kubectl get pod -n jinn-test-4
- 获取指定 Namespace 中的 Pod 信息。 -
kubectl descrobe pod nnxt-test-9z6dv -n jinn-test-4
- 查看指定 Namespace 中指定 Pod 的详细信息(命令中拼写错误,请修改为describe
)。 -
kubectl describe pod nnxt-test-9z6dv -n jinn-test-4
- 查看指定 Namespace 中指定 Pod 的详细信息。 -
kubectl get pods -n kube-system
- 获取指定 Namespace 中的 Pod 信息。 -
kubectl get pods -n kube-system|grep openapi
- 获取指定 Namespace 中名称包含关键字 "openapi" 的 Pod 信息。 -
kubectl get pods -n kube-system|grep webapi
- 获取指定 Namespace 中名称包含关键字 "webapi" 的 Pod 信息。 -
kubectl get po -A
- Get Pod information in all Namespaces. -
kubectl get po -A |grep 40329-0553885e-3530-11eb-83a2-0242ac1e5b04-rkvtn
- Obtain Pod information whose name contains the keyword "40329-0553885e-3530-11eb-83a2-0242ac1e5b04-rkvtn". -
kubectl describe po 40329-9f2ffb72-353c-11eb-b7a3-0242ac1e5b04-bvdrc -n dahuadltp-2
- View detailed information of the specified Pod in the specified Namespace. -
kubectl get node
- Get information about all nodes. -
kubectl describe po 40329-9f2ffb72-353c-11eb-b7a3-0242ac1e5b04-bvdrc -n dahuadltp-2
- View detailed information of the specified Pod in the specified Namespace. -
kubectl describe node 10.30.112.9
- View detailed information of the node with the specified IP. -
kubectl get node | grep 10.30.112.9
- Get information about the node with the specified IP. -
kubectl describe po 40329-9f2ffb72-353c-11eb-b7a3-0242ac1e5b04-bvdrc -n dahuadltp-2
- View detailed information of the specified Pod in the specified Namespace. -
kubectl get node
- Get information about all nodes. -
kubectl describe node 10.30.112.9
- View detailed information of the node with the specified IP. -
kubectl edit node 10.30.112.9
- Edit the node with the specified IP. -
kubectl describe node 10.30.112.9
- View detailed information of the node with the specified IP. -
kubectl edit node 10.30.112.9
- Edit the node with the specified IP. -
kubectl get po -A -o wide |grep 10.30.112.9
- Get Pod information in all Namespaces on the node with the specified IP. -
kubectl logs -n kube-system gpumonopoly-device-plugin-daemonset-95q5k
- Get the logs of the specified Pod in the specified Namespace. -
kubectl delete po -n kube-system gpumonopoly-device-plugin-daemonset-95q5k
- Delete the specified Pod in the specified Namespace. -
kubectl logs -n kube-system gpumonopoly-device-plugin-daemonset-95q5k
- Get the logs of the specified Pod in the specified Namespace. -
kubectl get po -A -o wide |grep 10.30.112.9
- Get Pod information in all Namespaces on the node with the specified IP. -
kubectl get po -A -o wide |grep 10.30.112.9
- Get Pod information in all Namespaces on the node with the specified IP. -
kubectl get ns
- Get information about all Namespaces. -
kubectl get sa -n dahuadltp-2
- Get the ServiceAccount information in the specified Namespace. -
kubectl describe sa -n dahuadltp-2
- View ServiceAccount details in the specified Namespace. -
kubectl describe secret default-token-p4zkw -n dahuadltp-2
- View Secret details in the specified Namespace. -
kubectl get pod -n dahuadltp-2
- Get Pod information in the specified Namespace. -
kubectl describe pod taskcenter-ol-m57rt
- View detailed information of a specified Pod. -
kubectl describe pod taskcenter-ol-m57rt -n dahuadltp-2
- View Pod details in the specified Namespace. -
kubectl get pod -n dahuadltp-2 | grep 38438-0bb6c1be-2952-11eb-b5fd-0242ac1e8b04
- Obtain Pod information whose name contains the keyword "38438-0bb6c1be-2952-11eb-b5fd-0242ac1e8b04" in the specified Namespace. -
kubectl get pod -n dahuadltp-2 | grep 38438-0bb6c1be-2952
- Obtain the Pod information whose name contains the keyword "38438-0bb6c1be-2952" in the specified Namespace. -
kubectl get pod -A | grep 38438
- Get information about all Pods in the Namespace whose names contain the keyword "38438". -
kubectl get pod 38438-53b28456-2acb-11eb-bf4b-0242ac1e5b04 -n kube-system
- Get information about the specified Pod in the specified Namespace. -
kubectl get pod -n kube-system | grep 38438-53b28456-2acb-11eb-bf4b
- Obtain Pod information whose name contains the keyword "38438-53b28456-2acb-11eb-bf4b" in the specified Namespace. -
kubectl get pod -n dahuadltp | grep 38438-53b28456-2acb-11eb-bf4b
- Obtain Pod information whose name contains the keyword "38438-53b28456-2acb-11eb-bf4b" in the specified Namespace. -
kubectl get pod -n dahuadltp-2 | grep 38438-53b28456-2acb-11eb-bf4b
- Obtain Pod information whose name contains the keyword "38438-53b28456-2acb-11eb-bf4b" in the specified Namespace. -
kubectl get pod -n dahuadltp-2 | grep 38438-53b28456-2acb-11eb-bf4b-0242ac1e5b04
- Obtain the Pod information whose name contains the keyword "38438-53b28456-2acb-11eb-bf4b-0242ac1e5b04" in the specified Namespace. -
kubectl describe nodes 10.30.113.11
- View detailed information of the node with the specified IP. -
kubectl get pods -o wide -A | grep "27711-3b61bb2a-289a-11eb-8f29-0242ac1e7b1b"
- Obtain Pod information whose name contains the keyword "27711-3b61bb2a-289a-11eb-8f29-0242ac1e7b1b". -
kubectl describe nodes 10.30.113.12
- View detailed information of the node with the specified IP. -
kubectl get pods -o wide -A | grep "[2020/11/17 15:34] 郭华朋: "
- Get Pod information containing specific information. -
kubectl get pods -o wide -A | grep "27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b"
- Get Pod information whose name contains the keyword "27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b". -
kubectl describe pod 27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b -n jinn-test-4
- View detailed information of the specified Pod in the specified Namespace. -
kubectl describe nodes 10.30.113.11
- View detailed information of the node with the specified IP. -
kubectl describe pods 27711-0be3a42c-28a8-11eb-8ec4-0242ac1e7b1b
- View detailed information of a specified Pod. -
kubectl describe pods 27711-0be3a42c-28a8-11eb-8ec4-0242ac1e7b1b -n jinn-test-4
- View Pod details in the specified Namespace. -
kubectl describe pods 27711-0be3a42c-28a8-11eb-8ec4-0242ac1e7b1b
- View detailed information of a specified Pod. -
kubectl describe nodes 10.30.113.11
- View detailed information of the node with the specified IP. -
kubectl get svc -n jinn-test-4
- Get Service information in the specified Namespace. -
kubectl get pod -n jinn-test-4
- Get Pod information in the specified Namespace. -
kubectl descrobe pod nnxt-test-9z6dv -n jinn-test-4
- View the detailed information of the specified Pod in the specified Namespace (the spelling in the command is incorrect, please modify itdescribe
). -
kubectl describe pod nnxt-test-9z6dv -n jinn-test-4
- View detailed information of the specified Pod in the specified Namespace. -
kubectl get pods -n kube-system
- Get Pod information in the specified Namespace. -
kubectl get pods -n kube-system|grep openapi
- Obtain Pod information whose name contains the keyword "openapi" in the specified Namespace. -
kubectl get pods -n kube-system|grep webapi
- Obtain Pod information whose name contains the keyword "webapi" in the specified Namespace. -
kubectl get po -A
- Get Pod information in all Namespaces. -
kubectl get po -A |grep 40329-0553885e-3530-11eb-83a2-0242ac1e5b04-rkvtn
- Obtain Pod information whose name contains the keyword "40329-0553885e-3530-11eb-83a2-0242ac1e5b04-rkvtn". -
kubectl describe po 40329-9f2ffb72-353c-11eb-b7a3-0242ac1e5b04-bvdrc -n dahuadltp-2
- View detailed information of the specified Pod in the specified Namespace. -
kubectl get node
- Get information about all nodes. -
kubectl describe node 10.30.112.9
- View detailed information of the node with the specified IP. -
kubectl get node | grep 10.30.112.9
- Get information about the node with the specified IP. -
kubectl describe po 40329-9f2ffb72-353c-11eb-b7a3-0242ac1e5b04-bvdrc -n dahuadltp-2
- View detailed information of the specified Pod in the specified Namespace. -
kubectl get node
- Get information about all nodes. -
kubectl describe node 10.30.112.9
- View detailed information of the node with the specified IP. -
kubectl edit node 10.30.112.9
- Edit the node with the specified IP. -
kubectl edit node 10.30.112.9
- Edit the node with the specified IP. -
kubectl get po -A -o wide |grep 10.30.112.9
- Get Pod information in all Namespaces on the node with the specified IP. -
kubectl logs -n kube-system gpumonopoly-device-plugin-daemonset-95q5k
- Get the logs of the specified Pod in the specified Namespace. -
kubectl delete po -n kube-system gpumonopoly-device-plugin-daemonset-95q5k
- Delete the specified Pod in the specified Namespace. -
kubectl logs -n kube-system gpumonopoly-device-plugin-daemonset-95q5k
- Get the logs of the specified Pod in the specified Namespace. -
kubectl delete po -n kube-system gpumonopoly-device-plugin-daemonset-95q5k
- Delete the specified Pod in the specified Namespace. -
kubectl get po -A -o wide |grep 10.30.112.9
- Get Pod information in all Namespaces on the node with the specified IP. -
kubectl delete po -n kube-system gpushare-device-plugin-daemonset-9f5qt
- Delete the specified Pod in the specified Namespace. -
kubectl get po -A -o wide |grep 10.30.112.9
- Get Pod information in all Namespaces on the node with the specified IP. -
kubectl get ns
- Get information about all Namespaces. -
kubectl get sa -n dahuadltp-2
- Get the ServiceAccount information in the specified Namespace. -
kubectl describe sa -n dahuadltp-2
- View ServiceAccount details in the specified Namespace. -
kubectl describe secret default-token-p4zkw -n dahuadltp-2
- View Secret details in the specified Namespace. -
kubectl get pod -n dahuadltp-2
- Get Pod information in the specified Namespace. -
kubectl describe pod taskcenter-ol-m57rt
- View detailed information of a specified Pod. -
kubectl describe pod taskcenter-ol-m57rt -n dahuadltp-2
- View Pod details in the specified Namespace. -
kubectl get pod -n dahuadltp-2 | grep 38438-0bb6c1be-2952-11eb-b5fd-0242ac1e8b04
- Obtain Pod information whose name contains the keyword "38438-0bb6c1be-2952-11eb-b5fd-0242ac1e8b04" in the specified Namespace. -
kubectl get pod 38438-53b28456-2acb-11eb-bf4b-0242ac1e5b04 -n kube-system
- Get information about the specified Pod in the specified Namespace. -
kubectl get pod -n kube-system | grep 38438-53b28456-2acb-11eb-bf4b
- Obtain Pod information whose name contains the keyword "38438-53b28456-2acb-11eb-bf4b" in the specified Namespace. -
kubectl get pod -n dahuadltp | grep 38438-53b28456-2acb-11eb-bf4b
- Obtain Pod information whose name contains the keyword "38438-53b28456-2acb-11eb-bf4b" in the specified Namespace. -
kubectl describe nodes 10.30.113.11
- View detailed information of the node with the specified IP. -
kubectl get pods -o wide -A | grep "27711-3b61bb2a-289a-11eb-8f29-0242ac1e7b1b"
- Obtain Pod information whose name contains the keyword "27711-3b61bb2a-289a-11eb-8f29-0242ac1e7b1b". -
kubectl get pods -o wide -A | grep "[2020/11/17 15:34] 郭华朋: "
- Get Pod information containing specific information. -
kubectl get pods -o wide -A | grep "27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b"
- Get Pod information whose name contains the keyword "27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b". -
kubectl describe pod 27711-773415fa-28a7-11eb-9de7-0242ac1e7b1b -n jinn-test-4
- View detailed information of the specified Pod in the specified Namespace. -
kubectl describe nodes 10.30.113.11
- View detailed information of the node with the specified IP. -
kubectl get svc -n jinn-test-4
- Get Service information in the specified Namespace. -
kubectl get pod -n jinn-test-4
- Get Pod information in the specified Namespace. -
kubectl descrobe pod nnxt-test-9z6dv -n jinn-test-4
- View the detailed information of the specified Pod in the specified Namespace (the spelling in the command is incorrect, please modify itdescribe
). -
kubectl describe pod nnxt-test-9z6dv -n jinn-test-4
- View detailed information of the specified Pod in the specified Namespace. -
kubectl get pods -n kube-system
- Get Pod information in the specified Namespace. -
kubectl get pods -n kube-system|grep openapi
- Obtain Pod information whose name contains the keyword "openapi" in the specified Namespace. -
kubectl get pods -n kube-system|grep webapi
- Obtain Pod information whose name contains the keyword "webapi" in the specified Namespace. -
kubectl get po -A
- Get Pod information in all Namespaces. -
kubectl get node
- Get information about all nodes. -
kubectl get pod -n jinn-test-4 -o wide
- Get Pod information in the specified Namespace. -
kubectl get node -o json | grep clustername
- Get the node's JSON configuration file and look for information containing the keyword "clustername". -
kubectl get node -o json | grep clustername | grep test-test
- Get the node's JSON configuration file and look for information containing the keywords "clustername" and "test-test". -
kubectl get node -o json | grep clustername | grep -C test-test
- Get the node's JSON configuration file and look for information containing the keyword "clustername" and its context. -
kubectl get node -o json | grep clustername | grep -C 20 test-test
- Get the JSON configuration file of the node and look for information containing the keyword "clustername" and its context, the context line number is 20. -
kubectl get node -o json | grep -C 20 test-test
- Get the JSON configuration file of the node and look for information containing the keyword "test-test" and its context, the context line number is 20. -
kubectl get ns
- Get information about all Namespaces.
k8s常用命令2
Guess you like
Origin blog.csdn.net/huapeng_guo/article/details/133377253
Recommended
Ranking