因为gitlab是再本地内网搭建的,证书也是自己生成的。使用argo添加地址的时候报错了
解决思路
coredns增加本地hosts解析
通过修改coredns的configmap文件来实现
1 2 3 4 5 6 7 8 9 10 11 |
kubectl edit configmap coredns -n kube-system 例: #添加本地hosts解析地址 hosts { 192.168.0.71 master01 192.168.0.72 node01 192.168.0.73 node02 fallthrough } |
1 |
kubectl get configmap coredns -n kube-system -o yaml |
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
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 { 192.168.0.21 gitlab.xxxxxxx.com fallthrough } prometheus :9153 forward . /etc/resolv.conf cache 30 loop reload loadbalance } kind: ConfigMap metadata: creationTimestamp: "2021-08-22T07:14:31Z" managedFields: - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:data: {} manager: kubeadm operation: Update time: "2021-08-22T07:14:31Z" - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:data: f:Corefile: {} manager: kubectl operation: Update time: "2021-08-25T02:33:47Z" name: coredns namespace: kube-system resourceVersion: "564286" selfLink: /api/v1/namespaces/kube-system/configmaps/coredns uid: 7dc195b1-bf14-4a7e-a368-394cd6bf9fe2 |
- 本文固定链接: https://www.yoyoask.com/?p=6630
- 转载请注明: shooter 于 SHOOTER 发表