安装有问题,一致卡着不动

  • Choerodon平台版本: 0.25

  • 遇到问题的执行步骤: 执行命令 ./c7nctl install c7n -c c7n-config.yaml --version=0.25 --debug

$ cat c7n-config.yaml

version: 0.25
metadata:
name: resource-choerodon
namespace: c7n-system # 指定命名空间安装choerodon
spec:
persistence:
storageClassName: nfs-storage
resources:
gitlab:
domain: gitlab.example.choerodon.io
minio:
domain: minio.example.choerodon.io
harbor:
domain: harbor.example.choerodon.io
chartmuseum:
domain: chart.example.choerodon.io
sonatype-nexus:
domain: nexus.example.choerodon.io
sonarqube:
domain: sonarqube.example.choerodon.io
choerodon-gateway:
domain: api.example.choerodon.io
choerodon-message:
domain: notify.example.choerodon.io
devops-service:
domain: devops.example.choerodon.io
choerodon-front-hzero:
domain: hzero.example.choerodon.io
choerodon-front:
domain: app.example.choerodon.io

  • 文档地址:

  • 环境信息(如:节点信息):

  • 报错日志:

一直卡在这一步:
DEBU[0209] Using existing configMaps c7n-logs in namespace c7n-system
DEBU[0209] Getting ConfigMaps key persistent
DEBU[0209] Getting ConfigMaps key release
DEBU[0209] Getting ConfigMaps key task
DEBU[0209] Task minio isn’t in group persistent
DEBU[0209] Task minio isn’t in group release
DEBU[0209] Task minio isn’t in group task
DEBU[0209] Task minio isn’t in c7n-logs,new add it
DEBU[0209] Using existing configMaps c7n-logs in namespace c7n-system
DEBU[0209] Saving ConfigMaps key persistent
DEBU[0209] Saving ConfigMaps key release
DEBU[0209] Saving ConfigMaps key task
INFO[0209] The Release minio was rendered successfully
DEBU[0209] Value ingress.hosts[0]: minio.example.choerodon.io, checking: clusterdomain
DEBU[0210] send request to slaver 0
DEBU[0210] Get status code: 200 of 172.122.225.168
DEBU[0210] send request to slaver 1
DEBU[0240] Get status code: 0 of 172.122.199.246
DEBU[0270] Get status code: 0 of 172.122.199.246
DEBU[0300] Get status code: 0 of 172.122.199.246
DEBU[0330] Get status code: 0 of 172.122.199.246
DEBU[0360] Get status code: 0 of 172.122.199.246

  • 原因分析:

$ kubectl -n c7n-system get po -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
c7n-slaver-2lfm2 1/1 Running 0 28m 172.122.225.168 node8
c7n-slaver-86khl 1/1 Running 0 28m 172.122.199.246 node7
c7n-slaver-hzl9z 1/1 Running 0 28m 172.122.33.148 node5
c7n-slaver-lgcwq 1/1 Running 0 28m 172.122.139.125 node6
c7n-slaver-nhwwl 1/1 Running 0 28m 172.122.3.88 node4
c7n-slaver-vrzqn 1/1 Running 0 28m 172.122.166.176 node1

  • 疑问:

使用一键安装必须保证域名能解析到节点 IP,域名解析失败就会卡住。

*.example.choerodon.io 需要替换成你自己的域名。

请教如果只是本地安装,采用本地hosts方式,那如何设置呢?
另外,节点ip是指的kubectl get node 的node ip吗?

请将域名设置到coredns 的 hosts 插件里

https://blog.csdn.net/u010533742/article/details/109641426

这边k8s集群有6个节点,分别为
192.168.0.85
192.168.0.178
192.168.0.179
192.168.0.208
192.168.0.215
192.168.0.218

在coredns 的 hosts这样设置对吗?

    hosts {
      192.168.0.218 gitlab.example.choerodon.io
      192.168.0.218 minio.example.choerodon.io
      192.168.0.218 harbor.example.choerodon.io
      192.168.0.218 chart.example.choerodon.io
      192.168.0.218 nexus.example.choerodon.io
      192.168.0.218 sonarqube.example.choerodon.io
      192.168.0.218 api.example.choerodon.io
      192.168.0.218 notify.example.choerodon.io
      192.168.0.218 devops.example.choerodon.io
      192.168.0.218 hzero.example.choerodon.io
      192.168.0.218 app.example.choerodon.io
       fallthrough
    }

最后一行 fallthrough 缩减保持一致

$ kubectl -n c7n-system exec -it c7n-slaver-c6vsl sh

kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] – [COMMAND] instead.

/ #

/ # ping app.example.choerodon.io

PING app.example.choerodon.io (192.168.0.218): 56 data bytes

64 bytes from 192.168.0.218: seq=0 ttl=63 time=0.672 ms

64 bytes from 192.168.0.218: seq=1 ttl=63 time=0.624 ms

^C

app.example.choerodon.io ping statistics —

2 packets transmitted, 2 packets received, 0% packet loss

round-trip min/avg/max = 0.624/0.648/0.672 ms

/ #

/ # exit

从上面来看,应该已经生效了。

清理一下重新安装
kubectl delete ns c7n-system

发现还是会卡住
DEBU[0097] Saving ConfigMaps key persistent
DEBU[0097] Saving ConfigMaps key release
INFO[0097] The Release minio was rendered successfully
DEBU[0097] Value ingress.hosts[0]: minio.example.choerodon.io, checking: clusterdomain
DEBU[0097] send request to slaver 0
DEBU[0097] Get status code: 200 of 172.122.199.226
DEBU[0097] send request to slaver 1
DEBU[0097] Get status code: 200 of 172.122.166.129
DEBU[0097] send request to slaver 2
DEBU[0097] Get status code: 200 of 172.122.33.176
DEBU[0097] send request to slaver 3
DEBU[0097] Get status code: 200 of 172.122.139.76
DEBU[0097] send request to slaver 4
DEBU[0097] Get status code: 200 of 172.122.3.88
DEBU[0097] send request to slaver 5
DEBU[0127] Get status code: 0 of 172.122.225.132
DEBU[0157] Get status code: 0 of 172.122.225.132
DEBU[0187] Get status code: 0 of 172.122.225.132
DEBU[0217] Get status code: 0 of 172.122.225.132
DEBU[0247] Get status code: 0 of 172.122.225.132
DEBU[0277] Get status code: 0 of 172.122.225.132