Deploying and Managing Workloads Using Rancher Manager - Part I
Deploying Harbor Container Registry with Rancher Manager
At this stage, we have 2 clusters that you can see in the Rancher Manager UI: the local cluster where Rancher Manager is running and a remote RKE2 cluster (rke2-cluster) that was imported into Rancher.
We will use the local cluster to deploy Harbor Container Registry. This is where we are going to push the image we built earlier for the todo-app.
To do this, we will create a separate namespace in the local cluster for Harbor. Follow these steps:
- Go to the Rancher Manager UI.
- Click on
Cluster Managementon the left-hand side menu. - Click on the
explorebutton next to thelocalcluster. - In the left-hand side menu, click on
Cluster>Projects/Namespaces. - Click on
Create Projectand give the project a name, for example,tools. Click onCreate.
Create Project
You should now see the project you just created in the list of projects.
ℹ️ While
Namespaceis a built-in mechanism to scope resources and create separate virtual clusters within a Kubernetes cluster,Projectis a Rancher-specific concept that allows you to group namespaces into a logical unit. This is useful when you want to assign different permissions to different users or teams within the same cluster. For example, you can assign a user to a project and give them access to only the namespaces within that project.
- Click on
Create Namespacein thetoolsproject. - Give the namespace a name, for example,
harbor.
At this level, you can configure the namespace, like setting resource quotas and labels. For now, we will leave the default settings.
- Click on
Create.
Once the namespace is created, we will use Helm to deploy Harbor into the harbor namespace.
To deploy Harbor, we will use the official Harbor Helm chart. Follow these steps:
- Click on
Apps>Repositoriesin the left-hand side menu of thelocalcluster. - Click on
Create. - Give the repository a name, for example,
harbor. - In the
Targetfield, selecthttp(s) URL to an index generated by helm. - Use the following URL:
https://helm.goharbor.io/in theIndex URLfield. - Click on
Createand wait for the repository to be created.
Let's install the chart:
- Go to
Apps>Chartsand search forharbor. - Click on the
harborchart that shows up in the search results. - Click on
Install. - Select the namespace
harborand give the release a name, for example,harbor. Continue to the next step.
At this level, you should see the default values for the Harbor Helm chart (values.yaml). You can customize these values to suit your needs. We are going to use the version 1.16.0 of the Harbor Helm chart. You can copy the default values and paste them from the values.yaml file below.
https://github.com/goharbor/harbor-helm/blob/1.16.0/values.yaml
This is what we are going to change:
- Change the
harborAdminPasswordtop@ssword. This is the password for the default admin user. You can change it to a more secure password. - Change the
externalURLtohttps://harbor.$WORKSPACE_PUBLIC_IP.sslip.io. Make sure to replace$WORKSPACE_PUBLIC_IPwith the actual IP address of theworkspaceserver before pasting the value in theexternalURLfield. - Change the
expose.ingress.hosts.coretoharbor.$WORKSPACE_PUBLIC_IP.sslip.io. - Change the
expose.ingress.classNametotraefik. This is the default ingress controller for Rancher Manager.
[...]
expose:
type: ingressEnd-to-End Kubernetes with Rancher, RKE2, K3s, Fleet, Longhorn, and NeuVector
The full journey from nothing to productionEnroll now to unlock all content and receive all future updates for free.

