安装docker 失败?
kubeeasy install kubernetes --master 172.129.31.40 --worker 172.129.31.41 --user root --password 000000 --version 1.22.1 --offline-file /opt/kubernetes.tar.gz
[root@master opt]# kubeeasy install k8s --master 172.129.31.40 --worker 172.129.31.41 --user root --password 000000 --version 1.21.1 --offline-file /opt/kubernetes.tar.gz
[2024-08-27 18:45:38] INFO: [start] bash kubeeasy install k8s --master 172.129.31.40 --worker 172.129.31.41 --user root --password ****** --version 1.21.1 --offline-file /opt/kubernetes.tar.gz
[2024-08-27 18:45:38] INFO: [check] sshpass command exists.
[2024-08-27 18:45:38] INFO: [check] rsync command exists.
[2024-08-27 18:45:38] INFO: [check] ssh 172.129.31.40 connection succeeded.
[2024-08-27 18:45:38] INFO: [check] ssh 172.129.31.41 connection succeeded.
[2024-08-27 18:45:38] INFO: [offline] unzip offline package on local.
[2024-08-27 18:45:46] INFO: [offline] unzip offline package succeeded.
[2024-08-27 18:45:46] INFO: [offline] master 172.129.31.40: load offline file
[2024-08-27 18:45:47] INFO: [offline] load offline file to 172.129.31.40 succeeded.
[2024-08-27 18:45:47] INFO: [offline] master 172.129.31.40: disable the firewall
[2024-08-27 18:45:47] INFO: [offline] 172.129.31.40: disable the firewall succeeded.
[2024-08-27 18:45:47] INFO: [offline] worker 172.129.31.41: load offline file
[2024-08-27 18:45:47] INFO: [offline] load offline file to 172.129.31.41 succeeded.
[2024-08-27 18:45:47] INFO: [offline] worker 172.129.31.41: disable the firewall
[2024-08-27 18:45:48] INFO: [offline] 172.129.31.41: disable the firewall succeeded.
[2024-08-27 18:45:48] INFO: [get] Get 172.129.31.40 InternalIP.
[2024-08-27 18:45:48] INFO: [result] get MGMT_NODE_IP value succeeded.
[2024-08-27 18:45:48] INFO: [result] MGMT_NODE_IP is 172.129.31.40
[2024-08-27 18:45:48] INFO: [init] master: 172.129.31.40
[2024-08-27 18:45:50] INFO: [init] init master 172.129.31.40 succeeded.
[2024-08-27 18:45:50] INFO: [init] master: 172.129.31.40 set hostname and hosts
[2024-08-27 18:45:51] INFO: [init] 172.129.31.40 set hostname and hosts succeeded.
[2024-08-27 18:45:51] INFO: [init] worker: 172.129.31.41
[2024-08-27 18:45:54] INFO: [init] init worker 172.129.31.41 succeeded.
[2024-08-27 18:45:54] INFO: [init] master: 172.129.31.41 set hostname and hosts
[2024-08-27 18:45:55] INFO: [init] 172.129.31.41 set hostname and hosts succeeded.
[2024-08-27 18:45:55] INFO: [install] install docker on 172.129.31.40.
[2024-08-27 18:46:24] INFO: [install] install docker on 172.129.31.40 succeeded.
[2024-08-27 18:46:24] INFO: [install] install kube on 172.129.31.40
[2024-08-27 18:46:24] ERROR: [install] install kube on 172.129.31.40 failed.
[2024-08-27 18:46:24] INFO: [install] install docker on 172.129.31.41.
[2024-08-27 18:46:54] INFO: [install] install docker on 172.129.31.41 succeeded.
[2024-08-27 18:46:54] INFO: [install] install kube on 172.129.31.41
[2024-08-27 18:46:54] ERROR: [install] install kube on 172.129.31.41 failed.
[2024-08-27 18:46:54] INFO: [kubeadm init] kubeadm init on 172.129.31.40
[2024-08-27 18:46:54] INFO: [kubeadm init] 172.129.31.40: set kubeadm-config.yaml
[2024-08-27 18:46:54] INFO: [kubeadm init] 172.129.31.40: set kubeadm-config.yaml succeeded.
[2024-08-27 18:46:54] INFO: [kubeadm init] 172.129.31.40: kubeadm init start.
[2024-08-27 18:46:55] ERROR: [kubeadm init] 172.129.31.40: kubeadm init failed.
ERROR Summary:
[2024-08-27 18:46:24] ERROR: [install] install kube on 172.129.31.40 failed.
[2024-08-27 18:46:54] ERROR: [install] install kube on 172.129.31.41 failed.
[2024-08-27 18:46:55] ERROR: [kubeadm init] 172.129.31.40: kubeadm init failed.
报错初始化失败?
[root@node1 opt]# kubeeasy install k8s --master 172.129.31.40 --worker 172.129.31.41 --user root --password 000000 --version 1.21.1 --offline-file /opt/kubernetes.tar.gz
[2024-08-27 17:42:49] INFO: [start] bash kubeeasy install k8s --master 172.129.31.40 --worker 172.129.31.41 --user root --password ****** --version 1.21.1 --offline-file /opt/kubernetes.tar.gz
[2024-08-27 17:42:49] INFO: [check] sshpass command exists.
[2024-08-27 17:42:49] INFO: [check] rsync command exists.
[2024-08-27 17:42:49] INFO: [check] ssh 172.129.31.40 connection succeeded.
[2024-08-27 17:42:49] INFO: [check] ssh 172.129.31.41 connection succeeded.
[2024-08-27 17:42:49] INFO: [offline] unzip offline package on local.
[2024-08-27 17:42:57] INFO: [offline] unzip offline package succeeded.
[2024-08-27 17:42:57] INFO: [offline] master 172.129.31.40: load offline file
[2024-08-27 17:42:57] INFO: [offline] load offline file to 172.129.31.40 succeeded.
[2024-08-27 17:42:57] INFO: [offline] master 172.129.31.40: disable the firewall
[2024-08-27 17:42:57] INFO: [offline] 172.129.31.40: disable the firewall succeeded.
[2024-08-27 17:42:57] INFO: [offline] worker 172.129.31.41: load offline file
[2024-08-27 17:43:33] INFO: [offline] load offline file to 172.129.31.41 succeeded.
[2024-08-27 17:43:33] INFO: [offline] worker 172.129.31.41: disable the firewall
[2024-08-27 17:43:33] INFO: [offline] 172.129.31.41: disable the firewall succeeded.
[2024-08-27 17:43:33] INFO: [get] Get 172.129.31.40 InternalIP.
[2024-08-27 17:43:33] INFO: [result] get MGMT_NODE_IP value succeeded.
[2024-08-27 17:43:33] INFO: [result] MGMT_NODE_IP is 172.129.31.40
[2024-08-27 17:43:33] INFO: [init] master: 172.129.31.40
[2024-08-27 17:43:36] INFO: [init] init master 172.129.31.40 succeeded.
[2024-08-27 17:43:36] INFO: [init] master: 172.129.31.40 set hostname and hosts
[2024-08-27 17:43:36] INFO: [init] 172.129.31.40 set hostname and hosts succeeded.
[2024-08-27 17:43:36] INFO: [init] worker: 172.129.31.41
[2024-08-27 17:43:38] INFO: [init] init worker 172.129.31.41 succeeded.
[2024-08-27 17:43:38] INFO: [init] master: 172.129.31.41 set hostname and hosts
[2024-08-27 17:43:38] INFO: [init] 172.129.31.41 set hostname and hosts succeeded.
[2024-08-27 17:43:38] INFO: [install] install docker on 172.129.31.40.
[2024-08-27 17:43:38] ERROR: [install] install docker on 172.129.31.40 failed.
[2024-08-27 17:43:38] INFO: [install] install kube on 172.129.31.40
[2024-08-27 17:43:39] INFO: [install] install kube on 172.129.31.40 succeeded.
[2024-08-27 17:43:39] INFO: [install] install docker on 172.129.31.41.
[2024-08-27 17:43:39] ERROR: [install] install docker on 172.129.31.41 failed.
[2024-08-27 17:43:39] INFO: [install] install kube on 172.129.31.41
[2024-08-27 17:43:39] INFO: [install] install kube on 172.129.31.41 succeeded.
[2024-08-27 17:43:39] INFO: [kubeadm init] kubeadm init on 172.129.31.40
[2024-08-27 17:43:39] INFO: [kubeadm init] 172.129.31.40: set kubeadm-config.yaml
[2024-08-27 17:43:40] INFO: [kubeadm init] 172.129.31.40: set kubeadm-config.yaml succeeded.
[2024-08-27 17:43:40] INFO: [kubeadm init] 172.129.31.40: kubeadm init start.
[2024-08-27 17:43:40] ERROR: [kubeadm init] 172.129.31.40: kubeadm init failed.
ERROR Summary:
[2024-08-27 17:43:38] ERROR: [install] install docker on 172.129.31.40 failed.
[2024-08-27 17:43:39] ERROR: [install] install docker on 172.129.31.41 failed.
[2024-08-27 17:43:40] ERROR: [kubeadm init] 172.129.31.40: kubeadm init failed.
See detailed log >> /var/log/kubeinstall.log
查看日志,说你的kubelet 版本过高 ,可是,别人或者自己手搭 也没有问题啊
[2024-08-27 18:36:29] EXEC: [command] sshpass -p "******" ssh -o ConnectTimeout=600 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q root@172.129.31.40 -p 22 bash -c 'kubeadm init --config=/etc/kubernetes/kubeadm-config.yaml --upload-certs'
[init] Using Kubernetes version: v1.21.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR KubeletVersion]: the kubelet version is higher than the control plane version. This is not a supported version skew and may lead to a malfunctional cluster. Kubelet version: "1.22.1" Control plane version: "1.21.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
[2024-08-27 18:36:30] ERROR: [kubeadm init] 172.129.31.40: kubeadm init failed.
?
且两个节点都安装了libesecommp 啊
解决办法
2009 是最新发布的环境,太老的话就容易报奇奇怪怪的错误
所以看看 你的环境是不是2009 的环境,不是的话,就重建虚拟机,要2009 的镜像
要是你是2009 的虚拟机环境也报错,那大概率是安装的服务有些影响,直接重搭一个,保证是环境是裸机的没有安装过其他的服务就可以了
# 防火墙关闭
[root@node1 ~]# systemctl stop firewalld
[root@node1 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
# 临时关闭Selinux
[root@node1 ~]# setenforce 0
# 关闭swapoff
[root@node1 ~]# swapoff -a
再次尝试就可以了