Harbor is a self-hosted container registry, it stores all the Docker images built by Drone after successful pipeline runs.
Useful features:
- Image retention & garbage collection to automatically prunes old images to save space.
Install Harbor
helm repo add harbor https://helm.goharbor.io
helm repo update
helm install harbor harbor/harbor -f harbor/local/values.yaml --namespace harbor --create-namespace
Trust the self signed certificate on your system
scp harborhost:/harbor/cert/path/ca.crt /usr/local/share/ca-certificates/ca.crt
sudo update-ca-certificates
sudo systemctl restart docker.service
Check you can login to the registry.
docker login https://registry.home.olirowan.local
Also add the certificate to Kubernetes
scp harbor/registry.home.olirowan.local.crt 192.168.56.10{1,2,3}:/tmp/
sudo cp /tmp/registry.home.olirowan.local.crt /usr/local/share/ca-certificates/registry.home.olirowan.local.crt
sudo update-ca-certificates
sudo service k3s restart
sudo service k3s-node restart