K8S 常用命令记录

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

# 获取node信息
kubectl get nodes

# 获取命名空间
kubectl get namespaces

# 查看node资源使用情况
kubectl top nodes

# 查看pod资源使用情况
kubectl top po -n 命名空间

# 查看pod运行情况
kubectl get po -n 命名空间

# 进入pod内部
kubectl exec -it pod名称 -n 命名空间 /bin/sh

# 查看service
Kubectl get svc -n 命名空间

# 查看ingress
Kubectl get ingress -n 命名空间

本文链接:

https://www.hehuapei.com/k8s-command/index.html