centos7下安装kubelet和kubeadm

1 配置安装源

修改文件**/etc/yum.repos.d/kubernetes.repo**内容如下

1
2
3
4
5
6
7
8
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

2 禁用selinux

1
setenforce 0

3 安装kubelet和kubeadm

1
yum install -y kubelet kubeadm

4 启用kubelet

1
systemctl enable kubelet && systemctl start kubelet

参考: