38 k8s-19.Ingress扩容缩容
作者:互联网
1.3 Ingress扩容缩容
1.扩容 01.#获取指定的ingress名下的pod [root@k8s-master01 ingress-nginx]# kubectl get pod –n ingress –n ingress-nginx –owide 02.#获取所有node #kubectl get node 03.#node01扩容ingress [root@k8s-master01 ingress-nginx]# kubectl label node k8s-node01 ingress=true node/k8s-node01 labeled #在节点上打了标签就会自动部署 04.#获取指定的ingress名下的pod [root@k8s-master01 ingress-nginx]# kubectl get pod –n ingress –n ingress-nginx –owide 2.缩容 01.#在node02上面缩容,注意末尾 - [root@k8s-master01 ingress-nginx]# kubectl label node k8s-master03 ingress- node/k8s-master labeled 02.#删除了标签,就会自动删除其节点的ingress [root@k8s-master01 ingress-nginx]# kubectl get pod -n ingress-nginx -o wide 03#.删除ingress,需要先在lb上把后端节点删除,在到k8s里删除其节点的ingress 04.#监听 [root@k8s-node01 ~]# ss -ntlp |grep 80 05. #执行[root@k8s-node01 ~]# ps aux | grep nginx 06. #执行[root@k8s-node01 ~]# netstat –lntp 看到对应的端口735667/nginx
标签:缩容,kubectl,Ingress,38,ingress,nginx,node01,k8s,root 来源: https://www.cnblogs.com/kevin306/p/16290991.html