How to install Harbor across multiple Kubernetes clusters

In this guide, I’ll walk you through the steps to deploy Harbor, a popular open-source container registry, across multiple Kubernetes clusters using Sveltos.

Prerequisites

Before we get started, make sure you have the following:

A running…


This content originally appeared on DEV Community and was authored by Simone Morellato

In this guide, I’ll walk you through the steps to deploy Harbor, a popular open-source container registry, across multiple Kubernetes clusters using Sveltos.

Prerequisites

Before we get started, make sure you have the following:

  • A running Kubernetes cluster with at least one node labeled with env: production.
  • Sveltos installed in your Kubernetes cluster.
  • kubectl and helm installed on your local machine.

Step 1: Create a Cluster Profile for Harbor

To deploy Harbor with Sveltos, you first need to create a ClusterProfile YAML configuration. This file defines the Harbor deployment, including the Helm chart repository and the required settings.

Here’s the YAML configuration I’m using:

Image description

Breaking Down the YAML Configuration
apiVersion: Specifies the version of the Sveltos API.
kind: Defines the resource type (ClusterProfile).
metadata: Contains the name of the ClusterProfile.
spec: Defines the deployment details.
clusterSelector: Targets clusters labeled with env: production.
syncMode: Set to Continuous, ensuring ongoing monitoring and updates.
helmCharts: Specifies the Helm chart details for Harbor, including the repository URL, chart name, version, release name, and namespace.
values: Customizes Helm chart values, setting Harbor to be exposed via a LoadBalancer with TLS enabled.

Step 2: Apply the Cluster Profile

Once you have the YAML configuration ready, you can apply it to your Kubernetes cluster with the following command:

kubectl apply -f deploy-harbor.yaml

This creates the ClusterProfile and kicks off the Harbor deployment on any cluster matching the specified label.

Step 3: Verify the Deployment

After applying the configuration, you can check whether Harbor is deploying correctly by running:

kubectl get pods -n harbor

You should see the Harbor components starting up. It may take a few moments for all pods to be in the Running state.

Step 4: Access Harbor

Once the deployment is complete, you need to access the Harbor UI. Since you configured Harbor to use a LoadBalancer, you can retrieve the external IP address by running:

kubectl get svc -n harbor

You can then look for the service named harbor and note the external IP address. Finally, open your web browser and navigate to:

http://<external-ip>.

Step 5: Configure Harbor

When you access Harbor for the first time, you are prompted to set up an admin account. You can simply follow the on-screen instructions to complete the setup.

Image description

Conclusion

And that’s it! You’ve successfully deployed Harbor on you Kubernetes cluster using Sveltos. With Harbor in place, you can now manage my container images securely and efficiently.

If you have any questions or need further assistance, feel free to reach out or check the official Sveltos and Harbor documentation. Happy containerizing!


This content originally appeared on DEV Community and was authored by Simone Morellato


Print Share Comment Cite Upload Translate Updates
APA

Simone Morellato | Sciencx (2025-02-19T22:27:52+00:00) How to install Harbor across multiple Kubernetes clusters. Retrieved from https://www.scien.cx/2025/02/19/how-to-install-harbor-across-multiple-kubernetes-clusters/

MLA
" » How to install Harbor across multiple Kubernetes clusters." Simone Morellato | Sciencx - Wednesday February 19, 2025, https://www.scien.cx/2025/02/19/how-to-install-harbor-across-multiple-kubernetes-clusters/
HARVARD
Simone Morellato | Sciencx Wednesday February 19, 2025 » How to install Harbor across multiple Kubernetes clusters., viewed ,<https://www.scien.cx/2025/02/19/how-to-install-harbor-across-multiple-kubernetes-clusters/>
VANCOUVER
Simone Morellato | Sciencx - » How to install Harbor across multiple Kubernetes clusters. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/19/how-to-install-harbor-across-multiple-kubernetes-clusters/
CHICAGO
" » How to install Harbor across multiple Kubernetes clusters." Simone Morellato | Sciencx - Accessed . https://www.scien.cx/2025/02/19/how-to-install-harbor-across-multiple-kubernetes-clusters/
IEEE
" » How to install Harbor across multiple Kubernetes clusters." Simone Morellato | Sciencx [Online]. Available: https://www.scien.cx/2025/02/19/how-to-install-harbor-across-multiple-kubernetes-clusters/. [Accessed: ]
rf:citation
» How to install Harbor across multiple Kubernetes clusters | Simone Morellato | Sciencx | https://www.scien.cx/2025/02/19/how-to-install-harbor-across-multiple-kubernetes-clusters/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.