本文主要是介绍k8s安装: kubeadm init出错:remote version is much newer: v1.21.0,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.1.6
出现如下错误:提示版本不一致
remote version is much newer: v1.21.0; falling back to: stable-1.17
[preflight] You can also perform this action in beforehand using ‘kubeadm config images pull’
解决问题:带上k8s版本
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=192.168.1.6 --kubernetes-version=v1.17.4
用集群前,新建文件config
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown ( i d − u ) : (id -u): (id−u):(id -g) $HOME/.kube/config
slave节点加入集群:
kubeadm join 192.168.1.6:6443 --token hxu4v3.6sj0z39dp79axn0c
–discovery-token-ca-cert-hash sha256:3c7c58be6a85fcbf768dc7972b3e24dba1cdc4f112f21dfa67cdb4d4a63158ea
这篇关于k8s安装: kubeadm init出错:remote version is much newer: v1.21.0的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!