Linux安装K8s

文章目录

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
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐