Installing Harbor in my bare metal K8S homelab

Photo by James Pond on Unsplash
  • Installing Harbor with cert-manager (auto issuing TLS certificates) and load balancer service
  • Configuring Harbor
  • Pulling and pushing images to harbor registry
  • Scanning images for vulnerabilities

Installing cert-manager and creating certificate issuer

The process to install cert-manager is pretty easy. According to the cert-manager website, you kubectl apply the remote yaml file and done. I used this approach in my ansible script. Today, I want to try helm3. The process is pretty straightforward. If you don’t have helm in your mac, “brew install helm” should work.

Installing Harbor using helm

Using helm with k8s is like apt/yum/dnf with Linux. You add/remove/update helm repo, then just helm install/uninstall/upgrade. Mostly, the default helm chart settings are good for different situations. If you want to customize the configuration, you can use “set” parameter or specify “values.yaml” when you run helm install. In my home lab env, I want to push and pull images from my laptop. It is “easier” for me to use a load balancer service instead of ingress in default.

Configuring Harbor

The initial configuration in Harbor web UI is pretty straightforward. First you login admin with the default password (inside the values.yaml). Next, you will add a user with a name and password.

Pulling and pushing images to Harbor registry

Now I come back to my mac with docker desktop installed. I should be able to login Harbor using “docker login” command.

A data nerd started from data center field engineer to cloud database reliability engineer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store