请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

/proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1

[vagrant@k8s-master ~]$ kubeadm init --apiserver-advertise-address 172.31.189.219 --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=Swap
[init] Using Kubernetes version: v1.20.3
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR IsPrivilegedUser]: user is not running as root
[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
[vagrant@k8s-master ~]$ sudo kubeadm init --apiserver-advertise-address 172.31.189.219 --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=Swap
[init] Using Kubernetes version: v1.20.3
[preflight] Running pre-flight checks
[WARNING Swap]: running with swap on is not supported. Please disable swap
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 contents are not set to 1
[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
[vagrant@k8s-master ~]$ sudo service kubectl start
Redirecting to /bin/systemctl start kubectl.service
Failed to start kubectl.service: Unit not found.
[vagrant@k8s-master ~]$ sudo systemctl start kubectl
Failed to start kubectl.service: Unit not found.
[vagrant@k8s-master ~]$ kubeadm version
kubeadm version: &version.Info{Major:“1”, Minor:“20”, GitVersion:“v1.20.2”, GitCommit:“faecb196815e248d3ecfb03c680a4507229c2a56”, GitTreeState:“clean”, BuildDate:“2021-01-13T13:25:59Z”, GoVersion:“go1.15.5”, Compiler:“gc”, Platform:
“linux/amd64”}
[vagrant@k8s-master ~]$ kubeadm init --apiserver-advertise-address 172.31.189.219 --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=Swap
[init] Using Kubernetes version: v1.20.3
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR IsPrivilegedUser]: user is not running as root
[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
[vagrant@k8s-master ~]$ sudo kubeadm init --apiserver-advertise-address 172.31.189.219 --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=Swap
[init] Using Kubernetes version: v1.20.3
[preflight] Running pre-flight checks
[WARNING Swap]: running with swap on is not supported. Please disable swap
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 contents are not set to 1
[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
[vagrant@k8s-master ~]$ modprobe br_netfilte
modprobe: FATAL: Module br_netfilte not found.
[vagrant@k8s-master ~]$ sudo kubeadm init --apiserver-advertise-address 172.31.189.219 --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=Swap
[init] Using Kubernetes version: v1.20.3
[preflight] Running pre-flight checks
[WARNING Swap]: running with swap on is not supported. Please disable swap
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 contents are not set to 1
[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
[vagrant@k8s-master ~]$

我sudo kubeadm init之后就报错,我查了百度,无法找到解决方法

正在回答 回答被采纳积分+3

1回答

麦兜搞IT 2021-02-24 04:47:22
0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号