使用Kops设置K8s集群
export KOPS_STATE_STORE=s3://clusters.aind.devops
export ZONES=ap-south-1a
export VPC=vpc-xxxxx
export node_count=2
export node_size=m4.large
export master_size=t2.medium
export api_loadbalancer_type=public
export topology=private
export dns=private
export dns_zone=Z25L42E21ILH89
export CLIENT=test
它创建了2个节点和1个主人我试图设置Jenkins docker build slave来在pod中构建docker镜像
我的构建失败了
Sending build context to Docker daemon 15.36 kB
Step 1/3 : FROM ubuntu
---> cd6d8154f1e1
Step 2/3 : RUN apt-get update -y
---> Using cache
---> 8007c6693623
Step 3/3 : RUN apt-get install vim -y
---> Running in cbbafcb6a37b
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package vim
The command '/bin/sh -c apt-get install vim -y' returned a non-zero code: 100
当我登录到节点并运行相同的构建它失败时,似乎docker守护程序没有获得DNS resoultion
请帮忙
为什么要在群集中构建图像?正确的方法是:
创建本地docker注册表:
至于为何无法找到vim包,请通过ping 8.8.8.8检查网络连接。默认情况下,如果节点具有Internet连接,则docker守护程序也具有Internet连接。