Linux安装K8s

Linux安装K8s

文章目录

  • Linux安装K8s

  • 下载k8e发行版本 Releases · xiaods/k8e (github.com)
  • 上传到devcloud
rz -bye
  • 解压缩
tar -zxvf k8e-1.19.14-k8e2.tar.gz 
  • 编译
make generate
SKIP_VALIDATE=true make

执行SKIP_VALIDATE=true make可能会遇到这个问题:

Docker Hub限频计划
https://www.docker.com/increase-rate-limits
Docker Hub将限制匿名和免费账户的docker pull频率,付费账户的pull请求则不受影响
  • 解决方法:
vim /etc/docker/daemon.json 

配置修改为:

{

     "registry-mirrors": [
         "https://dockerhub.woa.com",
         "https://hub-mirror.c.163.com",
         "https://mirror.baidubce.com"
     ],
    "insecure-registries" : [
        "mirrors.tencent.com",
        "hub.oa.com",
        "docker.oa.com:8080",
        "csighub.tencentyun.com",
        "bk.artifactory.oa.com:8080"
    ]
}
  • 重启docker
systemctl daemon-reload
systemctl restart docker
  • 编译出的k8e二进制在dist/artifacrs
cd ./dist/artifacts/
cp k8e /usr/bin/k8e
cp k8e /usr/bin/kubectl
  • 检查&启动
# precheck与启动
k8e check-config
chmod -R +x ./contrib/
./contrib/k8e-start-bootstrap.sh
export KUBECONFIG=/etc/k8e/k8e/k8e.yaml

你可能感兴趣的:(k8s,linux,docker,运维)