kube-proxy is actually running in all worker nodes (both node1 and node2 in this case), master does not route incoming requests to the pods. When you create a service of type NodePort, an arbitrary port is opened on every worker node (say 32123 for example), even if the pod is not running on that worker node, it can route that traffic to the node that is running the pod via kube-proxy. Generally, a loadbalancer like haproxy or nginx is put in front of the worker nodes to distribute incoming requests to these worker nodes. I had the same misconception before.
i was so confused about this topic, saw many videos, but this series just cleared everything!
please make more stuff!
Very informative video. Thank you.
thank you
why kube-proxy is on node2? shouldn't it be on master?
kube-proxy is actually running in all worker nodes (both node1 and node2 in this case), master does not route incoming requests to the pods. When you create a service of type NodePort, an arbitrary port is opened on every worker node (say 32123 for example), even if the pod is not running on that worker node, it can route that traffic to the node that is running the pod via kube-proxy. Generally, a loadbalancer like haproxy or nginx is put in front of the worker nodes to distribute incoming requests to these worker nodes. I had the same misconception before.
@@CemAnaral thx a lot!
@@kind03cn you're welcome :)
thank u sir