购买
下载掌阅APP,畅读海量书库
立即打开
畅读海量书库
扫码下载掌阅APP

4.2 安装Kubeadm

Kubeadm用于创建Kubernetes集群,下面介绍如何在集群中的所有节点上安装Kubeadm相关软件。

1)配置阿里云Kubernetes镜像源:


$ sudo tee /etc/yum.repos.d/kubernetes.repo <<-'EOF' 
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg 
https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
#查看yum源配置
$ sudo cat /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg 
https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg

2)安装Kubeadm相关软件: Uy1BYY+H9bJOJwSBLlRqxNKv86yUjlKsYwPJ8ibnOxDBNCBLo9MtQM0fNsQOOMWc


$ sudo yum install -y kubelet-1.12.4 kubeadm-1.12.4 kubectl-1.12.4 ipvsadm
...
Installed:
  ipvsadm.x86_64 0:1.27-7.el7             kubeadm.x86_64 0:1.12.4-0
  kubectl.x86_64 0:1.12.4-0               kubelet.x86_64 0:1.12.4-0
Dependency Installed:
  cri-tools.x86_64 0:1.12.0-0             kubernetes-cni.x86_64 0:0.6.0-0
  socat.x86_64 0:1.7.3.2-2.el7
Complete!

点击中间区域
呼出菜单
上一章
目录
下一章
×