k8s常用操作命令
kubectl get pod -o wide #获取pod list
kubectl get service -o wide #获取service list
kubectl delete service 服务名 #删除service
kubectl get node -o wide #获取node list
kubectl get deploy -o wide #获取deploy list
kubectl delete deploy deploy名称 #删除deploy
kubectl apply -y xx.yaml #部署服务、部署service
kubectl describe node loadtest-worker1 #获取node详细信息
kubectl describe pod kube-flannel-ds-n9mf9 -n kube-system #查看pod详细信息 -n后面是namespace
kubectl logs -f tomcat-deployment-84ff9bf6b4-54bdp #查看日志
kubectl exec -it pod /bin/bash #进入容器
kubectl get svc -l app=MyApp
kubectl explain pod.spec
kubectl scale deployment/cx-facade-deployment --replicas=1
kubectl set image deployment/cx-gateway-deployment cx-gateway=hub.westone.com.cn:18880/cx/cx-gateway:7b17641 #更新image
kubectl logs -f cx-facade-deployment-7d5d7bb497-kmw6b(pod name) #查看pod日志