Interview Prep/Linux/Kernel Parameters, Namespaces & cgroups

Why does Kubernetes require `net.ipv4.ip_forward=1` and `br_netfilter`?

AdvancedConceptKernel Parameters, Namespaces & cgroups
Answer

ip_forward=1 lets the node route packets between interfaces (pod veth ↔ node NIC); without it the kernel drops traffic not addressed to itself. The br_netfilter module plus net.bridge.bridge-nf-call-iptables=1 makes bridged pod traffic pass through iptables/nftables so kube-proxy's Service rules apply.

sudo modprobe br_netfilter
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1 net.ipv4.ip_forward=1
All Linux questions Roadmap: Linux

More on Kernel Parameters, Namespaces & cgroups