1.master节点 kubeadm init警告问题: 

 解决办法:

修改vim /etc/docker/daemon.json

增加 "exec-opts": ["native.cgroupdriver=systemd"]

{
  "registry-mirrors": ["https://ogeydad1.mirror.aliyuncs.com"], "exec-opts": ["native.cgroupdriver=systemd"]
}

执行systemctl daemon-reload,并重启docker:systemctl restart docker

重启kubelet:systemctl restart kubelet

kubeadm reset 重置

操作方法

1.Master 节点和Work节点都需要执行:kubeadm reset

[root@k8s-master ~]# kubeadm reset
[reset] Reading configuration from the cluster...
[reset] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]:

注意:
kubeadm reset 执行后不会删除$HOME/.kube文件,执行rm -rf $HOME/.kube

重新初始化配置kubeadm init 

具体可查看:centos7.6安装Kubernetes-V1.21

从该文章的4.3开始配置完5.1步骤,master才算配置完成

2.Node节点Kubeadm join 问题1:

 解决办法:

修改vim /etc/docker/daemon.json

增加 "exec-opts": ["native.cgroupdriver=systemd"]

{
  "registry-mirrors": ["https://ogeydad1.mirror.aliyuncs.com"], "exec-opts": ["native.cgroupdriver=systemd"]
}

执行systemctl daemon-reload,并重启docker:systemctl restart docker

重启kubelet:systemctl restart kubelet

3.Node节点Kubeadm join 问题2:

 此种情况出现,可能是master节点执行了kubeadm reset之前没有删除node导致;导致node节点的kubeadm还一直用的原来的配置;

解决方法:

node节点下执行 kubeadm reset命令,重置

重新执行join操作即可:

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐