大网数据广告活动
服务器运维问答

kube-proxy won't start in Minikube because of permission denied issue with /proc/sys/net/netfilter/nf_conntrack_max

· 52CE 我爱测

After updating Arch Linux (sudo pacman -Syu) and restarting the system, Minikube fails to start because of kube-proxy. The logs show it was trying to modify /proc/sys/net/netfilter/nf_conntrack_max but it ran into a permission de…

问题原文

原帖链接 · RedGiant · CC BY-SA 4.0

After updating Arch Linux (sudo pacman -Syu) and restarting the system, Minikube fails to start because of kube-proxy. The logs show it was trying to modify /proc/sys/net/netfilter/nf_conntrack_max but it ran into a permission denied issue.

I tried to run sudo chmod 777 /proc/sys/net/netfilter/nf_conntrack_max but the system didn't allow me. I also removed ~/.minikube and started again, but it still refused to work. Same issue when starting kind. Can anyone tell me how to fix this?

$ kubectl get pods -n kube-system

NAME                               READY   STATUS    RESTARTS   AGE
coredns-74ff55c5b-2hkpd             0/1     Running   0          22s
etcd-minikube                      0/1     Running   0          30s
kube-apiserver-minikube            1/1     Running   0          30s
kube-controller-manager-minikube   0/1     Running   0          30s
kube-proxy-qhhx9                   0/1     Error     2          22s
kube-scheduler-minikube            0/1     Running   0          30s
storage-provisioner                1/1     Running   0          35s

kubectl logs kube-proxy-qhhx9 -n kube-system

I0511 04:47:08.189373       1 node.go:172] Successfully retrieved node IP: 192.168.49.2
I0511 04:47:08.189422       1 server_others.go:142] kube-proxy node IP is an IPv4 address (192.168.49.2), assume IPv4 operation
W0511 04:47:08.207109       1 server_others.go:578] Unknown proxy mode "", assuming iptables proxy
I0511 04:47:08.207314       1 server_others.go:185] Using iptables Proxier.
I0511 04:47:08.208192       1 server.go:650] Version: v1.20.2
I0511 04:47:08.209006       1 conntrack.go:100] Set sysctl 'net/netfilter/nf_conntrack_max' to 131072
F0511 04:47:08.209060       1 server.go:495] open /proc/sys/net/netfilter/nf_conntrack_max: permission denied

Kernel version

$ uname -r
5.12.2-arch1-1
$ iptables --version
iptables v1.8.7 (legacy)

社区高分解答

原帖链接 · Joe Malt · CC BY-SA 4.0

There's a known bug in kind (see issue #2240), caused by a change in version 5.12.2 of the kernel to make nf_conntrack_max read-only in non-init network namespaces (more info in the relevant commit)

A workaround was applied in kind (PR), so as other answers have mentioned, upgrading kind should fix it.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-05-11)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。