Deploy Harbor on KubeSphere
This tutorial walks you through an example of deploying Harbor from the App Store of KubeSphere.
- Please make sure you .
- You need to create a workspace, a project, and a user account for this tutorial. The account needs to be a platform regular user and to be invited as the project operator with the role. In this tutorial, you log in as
project-regular
and work in the projectdemo-project
in the workspacedemo-workspace
. For more information, see Create Workspaces, Projects, Users and Roles.
Find Harbor and click Install on the App Information page.
Set a name and select an app version. Make sure Harbor is deployed in
demo-project
and click Next.On the App Settings page, edit the configuration file of Harbor. Pay attention to the following fields.
type
: The method you use to access the Harbor Service. This example usesnodePort
.tls
: Specify whether you want to enable HTTPS. Set it tofalse
for most cases.externalURL
: The URL exposed to tenants.Don’t forget to specify . This field can be very helpful if you have trouble accessing Harbor.
Make sure you use the HTTP protocol and its corresponding
nodePort
in this tutorial. For more information, see in FAQ.
When you finish editing the configuration, click Install to continue.
Wait until Harbor is up and running.
Step 2: Access Harbor
Based on the field
expose.type
you set in the configuration file, the access method may be different. As this example usesnodePort
to access Harbor, visithttp://<NodeIP>:30002
as set in the previous step.Note
You may need to open the port in your security groups and configure related port forwarding rules depending on your where your Kubernetes cluster is deployed.
How to enable HTTP login?
Set
tls.enabled
tofalse
in step 1 above. The protocol ofexternalURL
must be the same asexpose.nodePort.ports
.If you use Docker login, set to one of
insecure-registries
indaemon.json
, then reload Docker.Here is an example configuration file for your reference. Pay special attention to the comments.
How to enable HTTPS login?
a. Use self-signed certificates.
- Set
tls.enabled
totrue
in the configuration file in step 1, and editexternalURL
accordingly. - Copy the CA certificates stored in the Pod
harbor-core
‘s/etc/core/ca
to your host. - Trust the CA certificates by your host first, then restart Docker.
b. Use public SSL.
- Add certificates as a Secret.
- Set
tls.enabled
totrue
in the configuration file in step 1, and editexternalURL
accordingly.
- Set