kubectl,kubelet和kubeadm的安装

   1  apt-get -y install apt-transport-https ca-certificates curl software-properties-common
   2  curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
   3  add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
   4  apt-get -y update
   5  apt-cache madison docker-ce
   6  apt-get -y install docker-ce=18.06.3~ce~3-0~ubuntu
   7  mkdir -p /etc/docker
   8  tee /etc/docker/daemon.json <<-'EOF'
       {
       "registry-mirrors": ["https://iorjuh9h.mirror.aliyuncs.com"]
       }
       EOF
   9  systemctl restart docker
   10  apt-get update && apt-get install -y apt-transport-https
   11  curl -fsSL https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
   12  add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main"
   13  apt-get update
   14  apt-cache madison kubelet kubectl kubeadm |grep '1.15.4-00'
   15  apt install -y kubelet=1.15.4-00 kubectl=1.15.4-00 kubeadm=1.15.4-00
   16  tee /etc/default/kubelet <<-'EOF'
     KUBELET_EXTRA_ARGS="--fail-swap-on=false"
     EOF
   17  systemctl daemon-reload && systemctl restart kubelet

猜你喜欢

转载自www.cnblogs.com/chaojiyingxiong/p/12367171.html
今日推荐