본문 바로가기
DevOps

[Kubernetes] 클러스터 구성 중 접한 ERR

by Yoon_estar 2024. 10. 21.
728x90
반응형

ERR

# kubeadm init --pod-network-cidr=10.96.0.0/12 --apiserver-advertise-address=192.168.207.231
I1017 11:20:16.467463    4146 version.go:256] remote version is much newer: v1.31.1; falling back to: stable-1.28
[init] Using Kubernetes version: v1.28.14
[preflight] Running pre-flight checks
        [WARNING FileExisting-socat]: socat not found in system path
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
# kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"28", GitVersion:"v1.28.14", GitCommit:"66f3325d5562da565def802b8bacf431b082991d", GitTreeState:"clean", BuildDate:"2024-09-11T08:26:11Z", GoVersion:"go1.22.6", Compiler:"gc", Platform:"linux/amd64"}

해결

socat 설치

sudo apt-get install socat

 

이 문제는 br_netfilter 모듈이 로드되지 않아서 발생할 수 있습니다.

sudo modprobe br_netfilter
echo '1' | sudo tee /proc/sys/net/bridge/bridge-nf-call-iptables
echo '1' | sudo tee /proc/sys/net/bridge/bridge-nf-call-ip6tables

 

재부팅 후에도 이 설정이 유지되도록 /etc/sysctl.conf 파일에 다음 내용을 추가하세요

sudo echo 'net.bridge.bridge-nf-call-iptables = 1' >> /etc/sysctl.conf
sudo echo 'net.bridge.bridge-nf-call-ip6tables = 1' >> /etc/sysctl.conf

 

적용

sudo sysctl -p

 

다시 키를 생성하면 제대로 생성됩니다.

키 생성후 클러스터 구성 확인

# kubectl get no
NAME     STATUS     ROLES           AGE   VERSION
master   NotReady   control-plane   17m   v1.28.14
node    NotReady   <none>          15m   v1.28.14
반응형