简体   繁体   中英

How many kube-proxy should be in a kubernetes cluster?

I deployed kube.netes cluster in minikube which has one master node and one worker node. When I tried to see the kube-proxy with:

kubectl get pods -n kube-system

two kube-proxies apear

kube-proxy-6jxgq
kube-proxy-sq58d                 

According to the refrence architecture https://kube.netes.io/docs/concepts/overview/components/ kube-proxy is the component of worker node. I expect to see one kube-proxy not two. what is the reason?

kube-proxy runs on every node, when you use

kubectl get po -n kube-system -o wide

you will see the node the pods are running on

I have three nodes k8s cluster, one master and two worker nodes, i see 3 kube-proxy pods running, i tried to bring down a woker node, through i see 3 pods.

[root@devkmas01 ~]# kubectl get pods -n kube-system | grep -i kube-proxy
kube-proxy-msr8x                                 1/1     Running                  22         125d
kube-proxy-mwmqp                                 1/1     Running                  20         125d
kube-proxy-s8gwx                                 1/1     Running                  25         126d
[root@devkmas01 ~]# k get nodes
NAME                     STATUS     ROLES           AGE    VERSION
devkmas01.nirulabs.com   Ready      control-plane   126d   v1.24.3
devkwor01.nirulabs.com   Ready      <none>          125d   v1.24.3
devkwor02.nirulabs.com   NotReady   <none>          125d   v1.24.3

The official docs says:

kube-proxy is a.network proxy that runs on each node in your cluster, implementing part of the Kube.netes Service concept.

All cluster nodes, discarding its role, not just the worker node.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM