When registering the New Registry Endpoint against OVA harbor, it failed with an error message.
# kubectl -n ${HARBOR_NAMESPACE} harbor-core-xxxxxxxx
2024-10-22T07:45:32Z [ERROR] [/pkg/reg/adapter/native/adapter.go:126]: failed to ping registry https://ova-harbor.AAA.BBB: Get "https://ova-harbor/service/token?service=harbor-registry": dial tcp: lookup ova-harbor on <kube-dns-SVC-IP-ADDRESS>:53: server misbehaving
We can confirm
NOTE - Please note that there are no networking issue exists between the source harbor and destination harbor.
OVA harbor
In Harbor, registering a new registry endpoint retrieves the target's hostname information via Bearer realm. This hostname must be an FQDN that DNS can resolve.
You can check the Bearer realm information(Target harbor) from the source harbor pod.
kubect -n ${HARBOR_NAMESPACE} exec ${HARBOAR_CORE_POD} -- bash
curl -kv https://${OVA_HARBOR_FQDN}/v2/
#> ...
#> *Connected to ova-harbor.AAA.BBB (192.168.##.##) port 443
#> < Www-Authenticate: Bearer realm="https://ova-harbor/service/token",service="harbor-registry" # !!!!
<------ realm information is just only hostname, not FQDN so "New Registry Endpoint - TEST CONNECTION" failed.
Redeploy a new OVA harbor using the correct settings. Hostname should be set as FQDN.
OVA harbor doesn't support changing the hostname after deployment. Follow Official Document.