安裝 kubernetes

1711293058發表於2019-10-15

環境要求

  • Centos7
  • CPU:最低要求,1 CPU 2 核
  • 記憶體:最低要求,2GB
  • 磁碟:最低要求,20GB

1. 使用阿里映象

cat <<EOF > /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
exclude=kube*
EOF

2. 安裝

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
systemctl enable kubelet
systemctl start kubelet
kubeadm version
# 輸出一下資訊
#kubeadm version: &version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.1", #GitCommit:"d647ddbd755faf07169599a625faf302ffc34458", GitTreeState:"clean", BuildDate:"2019-10-#02T16:58:27Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

相關文章