Configuring Harbor with a Public SSL Certificate

1. Register the Harbor Public SSL Certificate

1. Change the hosts file.

vi /etc/hosts

[IP] Certificate domain
[IP] Certificate domain

2. Locate the harbor docker-compose.yml file.

$ sudo find / -name 'docker-compose.yml'
cocktail@priv-registry:~$ sudo find / -name 'docker-compose.yml'/var/lib/cubectl/harbor/docker-compose.yml
cocktail@priv-registry:~$

3. Modify the domain of the Harbor certificate.

$ cd /var/lib/cubectl/harbor/common/config/core
$ vi env​

# AS-IS
EXT_ENDPOINT=https://10.1.1.50
​# TO-BE (Connection address, example:)
EXT_ENDPOINT=https://harbor.cocktailcloud.io

4. Verify the location of the Harbor certificate.

5. Replace the certificate with the public SSL certificate.

6. Confirm that the SSL certificate is correctly configured in Nginx.

7. Restart Harbor.

8. Verify the connection.

9. Create a directory with the domain name in the /etc/containerd/certs.d directory on all nodes.

10. In the hosts.toml file of all directories in /etc/containerd/certs.d, change the part with an IP to the domain.

11. Copy the directory with the IP in /etc/docker/certs.d to the domain.

Last updated

Was this helpful?