kubernetes 集群安装加载 br_netfilter 模块

kubernetes 集群安装加载 br_netfilter 模块

Linux 系统默认是禁止数据包转发功能。

加载系统参数:

sysctl -p /etc/sysctl.d/k8s.conf

错误提示:

sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: No such file or directory

sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory

解决方法:加载 br_netfilter 模块

执行命令:

modprobe br_netfilter

解释:modprobe是一个命令行工具,用于在Linux系统中加载内核模块,执行以上命令加载br_netfilter 模块

修改k8s.conf文件,添加路由转发相关参数

vi /etc/sysctl.d/k8s.conf

net.bridge.bridge-nf-call-ip6tables = 1

net.bridge.bridge-nf-call-iptables = 1

net.ipv4.ip_forward = 1

执行从指定文件加载系统参数:

sysctl -p /etc/sysctl.d/k8s.conf

完成后,就可以继续执行初始化k8s了

相关推荐
tonngw2 小时前
【Mac 从 0 到 1 保姆级配置教程 16】- Docker 快速安装配置、常用命令以及实际项目演示
macos·docker·容器·开源·github·docker desktop·orbstack
Chan165 小时前
【 SpringCloud | 微服务 MQ基础 】
java·spring·spring cloud·微服务·云原生·rabbitmq
2201_761199046 小时前
k8s4部署
云原生·容器·kubernetes
慌ZHANG7 小时前
云原生技术驱动 IT 架构现代化转型:企业实践与落地策略全解
云原生
小柏ぁ7 小时前
calico/node is not ready: BIRD is not ready: BGP not established with xxx
运维·docker·kubernetes
三劫散仙8 小时前
kubernetes jenkins pipeline优化拉取大仓库性能指定分支+深度
容器·kubernetes·jenkins
西京刀客8 小时前
k8s热更新-subPath 不支持热更新
云原生·容器·kubernetes·configmap·subpath
weixin_434936288 小时前
k8S 命令
linux·容器·kubernetes
nuczzz11 小时前
GPU虚拟化
docker·kubernetes·k8s·gpu·nvidia
Johny_Zhao12 小时前
2025年6月Docker镜像加速失效终极解决方案
linux·网络·网络安全·docker·信息安全·kubernetes·云计算·containerd·yum源·系统运维