K8S离线安装kubeadm报错:conntrack is needed by kubelet

报错信息:

rpm -ivh kubeadm-1.18.20-0.x86_64.rpm kubectl-1.18.20-0.x86_64.rpm kubelet-1.18.20-0.x86_64.rpm kubernetes-cni-0.8.7-0.x86_64.rpm 
warning: kubeadm-1.18.20-0.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 3e1ba8d5: NOKEY
error: Failed dependencies:
	conntrack is needed by kubelet-1.18.20-0.x86_64
	socat is needed by kubelet-1.18.20-0.x86_64

解决办法:

cd /etc/yum.repos.d/
wget http://mirrors.aliyun.com/repo/epel-7.repo
wget http://mirrors.aliyun.com/repo/Centos-7.repo
yum install epel-release
yum install -y conntrack socat

安装后再次安装kubeadm

[root@localhost src]# kubeadm join 172.27.3.74:6443 --token wk3hq9.wjsl9nclsk5qs2zm     --discovery-token-ca-cert-hash sha256:d031e90047708d7d1f9d563a64d02336df67a8a151857095fa44f632cc884efc
W0704 15:09:02.429334   28281 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.
[preflight] Running pre-flight checks
	[WARNING Hostname]: hostname "k8s-node-05" could not be reached
	[WARNING Hostname]: hostname "k8s-node-05": lookup k8s-node-05 on 223.5.5.5:53: no such host
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.18" ConfigMap in the kube-system namespace
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...

This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

Logo

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

更多推荐