kubeadm init问题

1、解析不到对应的主机

 [WARNING Hostname]: hostname "k8s-master-01" could not be reached
  [WARNING Hostname]: hostname "k8s-master-01": lookup k8s-master-01 on 192.168.222.2:53: no such host

  

解决方式:

hostnamectl set-hostname k8s-master-01

[root@k8s-master-01 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 k8s-master-01
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 k8s-master-01
192.168.222.153 k8s-master-01
View Code

 

2、docker的cgroup driver和kubelet的cgroup driver不一致

[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/

解决方式:将docker和kubelet的cgroup driver都改成systemd

docker:
[root@k8s-m-01 ~]# cat /etc/docker/daemon.json
{
  "exec-opts": ["native.cgroupdriver=systemd"]
}

kubelet:
[root@k8s-m-01 ~]# cat /etc/sysconfig/kubelet
KUBELET_EXTRA_ARGS="--cgroup-driver=systemd"

systemctl daemon-reload
systemctl restart docker
systemctl restart kubelet

 

posted @ 2020-05-26 10:49  JvvYou  阅读(2660)  评论(0编辑  收藏  举报