Kubernete NAT pod IP on Windows Nodes Kubernete NAT pod IP on Windows Nodes kubernetes kubernetes

Kubernete NAT pod IP on Windows Nodes


The simple answer is you can't. iptables is a Linux thing. Windows has some alternatives that you can use to set up NAT (netsh) like described here: https://superuser.com/questions/1088309/windows-10-nat-port-forwarding-ip-masquerade, but there's no specific K8s support so you will be on your own.

To make sure your ip-masq-agent doesn't get scheduled on your Windows nodes you can follow a NodeSelector, Taint/Toleration approach as described here.

A wider question would be what are you trying to run on the Windows machines? Windows containers are not interchangeable with Linux containers. If you want your Linux pods and Windows pods to talk to each other have you tried Flannel?