yum源安装kubeadm

配置可用的国内yum安装源

vim /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg

安装kubeadm, 会默认安装 kubectl ,无需要单独安装kubectl.

yum list kubeadm --showduplicates | sort -r 
yum install -y kubeadm-1.13.10-0

重启,继续做相关操作。

reboot

安装kubelet

yum install -y kubelet-1.13.10-0

启动kubelet并设置开机启动

systemctl enable kubelet 
systemctl start kubelet

检查状态

检查状态,发现是failed状态,是因为master节点没有初始化,kubelet默认设置10秒重启一次,等初始化master节点后即可恢复正常。

systemctl status kubelet

Last updated