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
More on Kernel Parameters, Namespaces & cgroups
What is sysctl and how do you make a change persistent?BeginnerAre sysctl settings global, or per namespace?AdvancedWhat are Linux namespaces? List all types.BeginnerHow do you create and enter namespaces by hand?AdvancedHow does a network namespace get connectivity?AdvancedWhat does the user namespace enable?Advanced