開源容器應用自動化部署技術Kubernetes安裝教程
Kubernetes安裝具體步驟
所有服務器節(jié)點安裝 Docker/kubeadm/kubelet/kubectl
Kubernetes 默認容器運行環(huán)境是Docker,因此首先需要安裝Docker;
(1)安裝 Docker
更新docker的yum源
yum install wget -y
wget https://mirrors.a(chǎn)liyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
安裝指定版本的docker:
yum install docker-ce-19.03.13 -y
yum install docker -y (這個安裝的Docker版本偏舊) 1.13.x
配置加速器加速下載 (https://cr.console.a(chǎn)liyun.com/)
/etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
https://gg3gwnry.mirror.a(chǎn)liyuncs.com
然后執(zhí)行:
systemctl enable docker.service
不然會提示警告;
那么接下來需要搭建:kubeadm、kubelet、kubectl
添加k8s的阿里云YUM源
cat > /etc/yum.repos.d/kubernetes.repo << EOF
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.a(chǎn)liyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=https://mirrors.a(chǎn)liyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.a(chǎn)liyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
到時候下載k8s的相關組件才能找到下載源;
(2)安裝 kubeadm,kubelet 和 kubectl
yum install kubelet-1.19.4 kubeadm-1.19.4 kubectl-1.19.4 -y
然后執(zhí)行:
systemctl enable kubelet.service
不然會提示警告;
查看有沒有安裝:
yum list installed | grep kubelet
yum list installed | grep kubeadm
yum list installed | grep kubectl

請輸入評論內(nèi)容...
請輸入評論/評論長度6~500個字