How does kube-proxy configure services of type nodePort?

2/26/2019

When creating a kubernetes service of type nodePort, kube-proxy configures each worker node to listen on a particular port.

How does kube-proxy (in the iptables proxy mode) actually configure this? Is it just done using iptables which opens a port? (not sure if that is even possible)

-- dippynark
iptables
kube-proxy
kubernetes

1 Answer

2/27/2019

Kube Proxy uses IPTable and netfilter rules for forwarding traffic from nodeports to pods. Mark Betz's article series on K8's networking is a good read. https://medium.com/google-cloud/understanding-kubernetes-networking-services-f0cb48e4cc82

-- Karthik
Source: StackOverflow