k8s 初始化Master& worker节点是报错


CentOS 7.8

报错1:

[config/images] Pulled registry.aliyuncs.com/k8sxio/pause:3.2
[config/images] Pulled registry.aliyuncs.com/k8sxio/etcd:3.4.13-0
failed to pull image “swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0”:
output: time=“2021-04-30T13:26:14+08:00” level=fatal msg=“pulling
image failed: rpc error: code = NotFound desc = failed to pull and
unpack image “swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0”:
failed to resolve reference
“swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0”:
swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0: not found”, error: exit
status 1 To see the stack trace of this error execute with --v=5 or
higher

coredns:1.8.0

failed to resolve reference \"swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0\"

解决方法

curl -sSL https://kuboard.cn/install-script/v1.20.x/init_master.sh | sh -s 1.20.6 /coredns

报错2:

[config/images] Pulled
swr.cn-east-2.myhuaweicloud.com/coredns/coredns:1.8.0

初始化 Master 节点 [init] Using Kubernetes version: v1.20.6 [preflight]
Running pre-flight checks 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 [ERROR
FileContent–proc-sys-net-ipv4-ip_forward]:
/proc/sys/net/ipv4/ip_forward contents are not set to 1

bridge-nf-call-iptables does not exist

[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist

解决方法

root下执行:

modprobe br_netfilter

ip_forward contents are not set to 1

[ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1

解决方法

ip_forward contents没有被设置成1,查看内容:

cat /proc/sys/net/ipv4/ip_forward
0

0代表禁止
1代表转发
修改

echo "1" > /proc/sys/net/ipv4/ip_forward

超时

在这里插入图片描述

重置

重新初始化 master 节点前,请先执行 操作

kubeadm reset -f 
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值