kubectl的几条命令
kubectl的几条命令
1
2
3
4
5
6
7
8
9
10
11
12
kubectl get pods
kubetctl get pods -o wide
kubectl describe pod <pod_name>
kubectl get node -o wide
kubectl get service -o wide
kubectl get namespace -o wide
kubectl create -f file.yaml # 使用yaml文件创建pod
kubectl exec nginx-app ps aux
kubectl logs nginx-app
kubectl get pod nginx-app -o yaml
kubectl get pods nginx-app -o yaml
kubectl run --image=nginx:alpine nginx-app --port=80 # 使用run命令创建pod
This post is licensed under CC BY 4.0 by the author.