開源容器應(yīng)用自動(dòng)化部署技術(shù)Kubernetes安裝教程
Kubernetes安裝具體步驟
所有服務(wù)器節(jié)點(diǎn)安裝 Docker/kubeadm/kubelet/kubectl
Kubernetes 默認(rèn)容器運(yùn)行環(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 (這個(gè)安裝的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
不然會(huì)提示警告;
那么接下來需要搭建: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
到時(shí)候下載k8s的相關(guān)組件才能找到下載源;
(2)安裝 kubeadm,kubelet 和 kubectl
yum install kubelet-1.19.4 kubeadm-1.19.4 kubectl-1.19.4 -y
然后執(zhí)行:
systemctl enable kubelet.service
不然會(huì)提示警告;
查看有沒有安裝:
yum list installed | grep kubelet
yum list installed | grep kubeadm
yum list installed | grep kubectl

發(fā)表評(píng)論
請(qǐng)輸入評(píng)論內(nèi)容...
請(qǐng)輸入評(píng)論/評(píng)論長(zhǎng)度6~500個(gè)字
圖片新聞
最新活動(dòng)更多
-
10月23日火熱報(bào)名中>> 2025是德科技創(chuàng)新技術(shù)峰會(huì)
-
10月23日立即報(bào)名>> Works With 開發(fā)者大會(huì)深圳站
-
10月24日立即參評(píng)>> 【評(píng)選】維科杯·OFweek 2025(第十屆)物聯(lián)網(wǎng)行業(yè)年度評(píng)選
-
11月27日立即報(bào)名>> 【工程師系列】汽車電子技術(shù)在線大會(huì)
-
12月18日立即報(bào)名>> 【線下會(huì)議】OFweek 2025(第十屆)物聯(lián)網(wǎng)產(chǎn)業(yè)大會(huì)
-
精彩回顧立即查看>> 【限時(shí)福利】TE 2025國(guó)際物聯(lián)網(wǎng)展·深圳站
推薦專題