kubernetes node节点加入容器 [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forw

网友投稿 394 2022-09-09

kubernetes node节点加入容器 [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forw

出现问题

出现这个问题的原因是我想kubernetes node节点想加入主节点 然后说是 /proc/sys/net/ipv4/ip_forward 文件没有设置成1

[root@zjj102 ~]# kubeadm join 172.16.10.101:6443 --token qnv1yd.t6md74mwcnty78uv --discovery-token-ca-cert-hash sha256:13c8363f7beea0ee257730c981a501c222bc9a914c37331d07242149451f2f8fW0228 13:36:38.965166 54276 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.[preflight] Running pre-flight checks [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at execution phase preflight: [preflight] Some fatal errors occurred: [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward 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

解决

输入 : sysctl -w net.ipv4.ip_forward=1 就可以解决这个问题了

[root@zjj102 ~]# sysctl -w net.ipv4.ip_forward=1net.ipv4.ip_forward = 1[root@zjj102 ~]# kubeadm join 172.16.10.101:6443 --token qnv1yd.t6md74mwcnty78uv --discovery-token-ca-cert-hash sha256:13c8363f7beea0ee257730c981a501c222bc9a914c37331d07242149451f2f8fW0228 13:39:48.512234 55718 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.[preflight] Running pre-flight checks [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at Reading configuration from the cluster...[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.18" ConfigMap in the kube-system namespace[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"[kubelet-start] Starting the kubelet[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...This node has joined the cluster:* Certificate signing request was sent to apiserver and a response was received.* The Kubelet was informed of the new secure connection details.Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Kubernetes的Pod的一些概念
下一篇:华为将手机营销模式复制至汽车业务,张一鸣内部信谈卸任原因!
相关文章

 发表评论

暂时没有评论,来抢沙发吧~