Error- helm docker-registry does not have any active endpoint

troubleshootings

After I upgrade helm docker-registry to 2.7.1 and I met an error below.

ConnectionError: HTTPSConnectionPool(host='registry.xxxxxxx.com', port=443)
: Max retries exceeded with url
: /v2/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x109aa90d0>
: Failed to establish a new connection
: [Errno 8] nodename nor servname provided, or not known'))
while doing GET request to URL: https://registry.xxxxxxx.com/v2/

So I looked into logs of nginx-controller pods and then I found another error log related to this issue.

Service "default/docker-registry" does not have any active Endpoint.

It seems that the service in Kubernetes doesn’t work well with the Ingress of docker-registry. Then I specified the port number 5000 in docker-registry config like below.

service:
   port: 5000
   type: "ClusterIP"

Then it solved the issue. I am not sure why it happens. The port 5000 is a default port number of helm docker-registry chart.