Я развернул гавань в кластере k8s, используя helm вот так:
helm install --name zqsb.
В журналах kubectl указано, что harbor-adminserver не удалось подключиться к tcp: // zqsb-harbor-database: 5432
преобразователь имен DNS и тест порта nc прошли в контейнере busybox следующим образом:
kubectl exec -ti busybox - / bin / sh
/ # nslookup zqsb-harbor-database
Сервер: 10.32.0.10
Адрес 1: 10.32.0.10 kube-dns.kube-system.svc.cluster.local
Имя: zqsb-harbour-database
Адрес 1: 10.32.0.212 zqsb-harbour-database.default.svc.cluster.local
nc zqsb-harbor-database 5432 -v
zqsb-harbour-database (10.32.0.212:5432) open
[root@qmtjj-01 ~]# kubectl get pods
NAME READY STATUS RESTARTS AGE
busybox 1/1 Running 56 2d8h
busybox-bd8fb7cbd-wgvzj 1/1 Running 4685 195d
docker-registry 1/1 Running 4 173d
my-nginx-nginx-ingress-controller-565bc9555b-bqfr7 1/1 Running 4 191d
my-nginx-nginx-ingress-default-backend-5bcb65f5f4-6ldk6 1/1 Running 6 191d
nginx-cdd8d77b-m7c5q 1/1 Running 4 184d
zqsb-harbor-adminserver-67fd879c6b-pbkkd 0/1 CrashLoopBackOff 449 26h
zqsb-harbor-chartmuseum-58998dd66-jncxp 1/1 Running 0 26h
zqsb-harbor-clair-86b7d87647-hxbxc 0/1 Running 382 26h
zqsb-harbor-core-67588547d6-sqxrv 0/1 CrashLoopBackOff 415 26h
zqsb-harbor-database-0 1/1 Running 1 26h
zqsb-harbor-jobservice-85b4bd499b-cgvst 0/1 CrashLoopBackOff 411 26h
zqsb-harbor-nginx-5f5458759d-wb948 1/1 Running 0 26h
zqsb-harbor-notary-server-6898d555ff-6km2p 1/1 Running 27 26h
zqsb-harbor-notary-signer-dc8dd5ff9-bztpr 1/1 Running 28 26h
zqsb-harbor-portal-5cd8cf6df5-bv62z 1/1 Running 0 26h
zqsb-harbor-redis-0 1/1 Running 0 26h
zqsb-harbor-registry-cb8fbbb66-k8d6w 2/2 Running 0 26h
[root@qmtjj-01 ~]# kubectl logs zqsb-harbor-adminserver-67fd879c6b-pbkkd
2019-05-01T10:57:07Z [INFO] initializing system configurations...
2019-05-01T10:57:07Z [INFO] Registering database: type-PostgreSQL host-zqsb-harbor-database port-5432 databse-registry sslmode-"disable"
2019-05-01T10:57:08Z [ERROR] [utils.go:101]: failed to connect to tcp://zqsb-harbor-database:5432, retry after 2 seconds :dial tcp: i/o timeout
2019-05-01T10:57:12Z [ERROR] [utils.go:101]: failed to connect to tcp://zqsb-harbor-database:5432, retry after 2 seconds :dial tcp: lookup zqsb-harbor-database on 10.32.0.10:53: dial udp 10.32.0.10:53: i/o timeout
2019-05-01T10:57:18Z [ERROR] [utils.go:101]: failed to connect to tcp://zqsb-harbor-database:5432, retry after 2 seconds :dial tcp: i/o timeout
2019-05-01T10:57:28Z [ERROR] [utils.go:101]: failed to connect to tcp://zqsb-harbor-database:5432, retry after 2 seconds :dial tcp: i/o timeout
2019-05-01T10:57:46Z [ERROR] [utils.go:101]: failed to connect to tcp://zqsb-harbor-database:5432, retry after 2 seconds :dial tcp 10.32.0.212:5432: i/o timeout
как решить проблему? Я могу собрать другую информацию, если это необходимо.