zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    【01】国内外git托管平台(总结by魔芋)
    【01】git下载和安装的完整过程
    分享一些正确的放松方式
    【03】图解原型和原型链by魔芋
    求一个正整数的阶乘
    乘法表
    Web Best Practices
    【03】const
    【02】块级作用域
    【01】let和const命令
  • 原文地址:https://www.cnblogs.com/bill2014/p/12964118.html
Copyright © 2011-2022 走看看