查看集群状态
#查看节点节点
kubect get node
#查看正在组件运行状态
kubectl get conponetstatus
#查看所有的资源
kubectl get all
kubectl get pods -all-namespaces
kubectl get pods -n namespaces
kubectl describe pod pod Name
#查看pods及运行节点
kubectl get pods -o wide
#为deployment 资源暴露一个新的service
kubectl expose deployment nginx --port = 88 -
target = 80
kubectl get ep nginx
轮询算法
#查看服务的描述信息
kubectl describe svc /服务名称
#重建pods
kubect replace -f busybox.yaml --force
#测试解析dns
kubectl exec busybox -it sh
nslookup nginx-deployment(默认服务名称)
或
kubectl exec -it busybox --nslookup nginx-service