k8 流水线 缺少maven 依赖包 coredns加域名解析
在k8s 里面加域名解析hosts
kubectl edit configmap coredns -n kube-system
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | apiVersion: v1 data: Corefile: | .:53 { errors health { lameduck 5s } ready kubernetes cluster.local in -addr.arpa ip6.arpa { pods insecure fallthrough in -addr.arpa ip6.arpa ttl 30 } hosts { 182.92.29.16 maven.aliyun.com 211.154.222.157 archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com 59.110.190.73 oss-cn-beijing.aliyuncs.com fallthrough } prometheus :9153 cache 30 loop reload loadbalance } kind: ConfigMap metadata: creationTimestamp: "2023-04-13T02:27:14Z" name: coredns namespace : kube-system resourceVersion: "160191242" uid: bb9bce1e-6ef5-4b3c-8530-f6105cbea464 |
这些解析域名的IP如何来的呢:
[root@node01 tmp]# ping maven.aliyun.com
PING tyjr-common-cn-beijing.aliyun.com.vipgds.alibabadns.com (182.92.29.16) 56(84) bytes of data.
64 bytes from 182.92.29.16 (182.92.29.16): icmp_seq=1 ttl=87 time=21.5 ms
64 bytes from 182.92.29.16 (182.92.29.16): icmp_seq=2 ttl=87 time=21.3 ms
[root@master01 ~]# ping archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com
PING archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com.gds.alibabadns.com (211.154.222.157) 56(84) bytes of data.
64 bytes from 211.154.222.157 (211.154.222.157): icmp_seq=1 ttl=83 time=20.2 ms
64 bytes from 211.154.222.157 (211.154.222.157): icmp_seq=2 ttl=83 time=20.0 ms
64 bytes from 211.154.222.157 (211.154.222.157): icmp_seq=3 ttl=83 time=20.0 ms
^C
--- archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com.gds.alibabadns.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 20.076/20.130/20.236/0.074 ms
[root@master01 ~]# ping oss-cn-beijing.aliyuncs.com
PING oss-cn-beijing.aliyuncs.com (59.110.190.79) 56(84) bytes of data.
64 bytes from 59.110.190.79 (59.110.190.79): icmp_seq=1 ttl=87 time=42.8 ms
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端