I am new to K8, currently learning node port service. I have three node cluster with node network on 192…168.1.0/24:
N1: 192.168.1.10
N2: 192.168.1.20
Master: 192.168.1.40
In my set up, I have NGINX app that is running on port 80 on pod2, on node2. I have exposed NGINX service using node port service on port 30000.
When I browse the service externally using 192.168.1.10:3000, I noticed following:
- Node1 , starts a new TCP session sourced from its flannel.1 IP, destined to POD2 's IP.
There is no NATTING on Node1. But then I read following:
Packets sent to Services with [Type=NodePort
] are source NAT’d by default.
I have not changed any setting on my ubuntu for IP tables.
Much appreciated!!!
Cluster information:
Kubernetes version: v1.26.0
Cloud being used: Bare metal
Installation method: kubeadm init
Host OS: Ubuntu 18.04 LTS
CNI and version: 10-flannel.conflist
CRI and version: containerd://1.6.14