Skip to content
6월 18, 2025chattiboykubernetes

kubernetes | br_netfilter 활성이 필요한가?

image 1

그동안 kubeadm으로 kubernetes를 설치하면서 확인해야지 하고 넘겼던 br_netfilter활성이 필요한지에 대해서 찾아보았다.

쿠버네티스 1.29버전을 설치하는 것 까지는 설치 가이드를 보면 br_netfilter를 활성하라는 내용을 확인 할 수 있다.

내용 확인(본문 스크랩)

Forwarding IPv4 and letting iptables see bridged traffic
Execute the below mentioned instructions:

# Forwarding IPv4 and letting iptables see bridged traffic
# Execute the below mentioned instructions:
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
EOF

sudo modprobe overlay
sudo modprobe br_netfilter

# sysctl params required by setup, params persist across reboots
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables  = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward                 = 1
EOF

# Apply sysctl params without reboot
sudo sysctl --system

Verify that the br_netfilter, overlay modules are loaded by running the following commands:

lsmod | grep br_netfilter
lsmod | grep overlay

Verify that the net.bridge.bridge-nf-call-iptables, net.bridge.bridge-nf-call-ip6tables, and net.ipv4.ip_forward system variables are set to 1 in your sysctl config by running the following command:

sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward

그러나…

그러나 Calico(오래된 버전은 모르겠지만…)에서는 br_netfilter를 활성하지 않아도 문제가 없다. 반면에 리서치를 좀 해보니

flannel에서는 이슈가 있다는 내용을 찾을 수 있었다.

gpt에 넣어보니…

image 1

Flannel github에서도 br_netfilter를 활성하라는 내용을 찾아볼수 있다.

https://github.com/flannel-io/flannel

Flannel requires the br_netfilter module to start and from version 1.30 kubeadm doesn't check if the module is installed and Flannel will not rightly start in case the module is missing.

※ Flannel을 이용해서 실습을 하고 있다면 각 노드에서 br_netfilter가 활성되어 있는지 확인 필요.

※ MetalLB를 L2 방식으로 사용하면 활성하는게 좋아보임…

추가 참고자료

flannel 관련 자료.

https://malwareanalysis.tistory.com/254

Leave a comment