Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy Harbor in Kubernetes

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to deploy Harbor in Kubernetes". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to deploy Harbor in Kubernetes.

Harbor is an enterprise-level container image warehouse management system, which is used to establish a private container image library for enterprise users. On the one hand, it can accelerate the network transmission installed internally, on the other hand, it provides its own unique version to better ensure availability and security. Harbor was originally developed by VMWare China and is all open source.

1. Important changes in Harbor

Harbor recently released version 1.6, which will bring some very important changes.

This version begins to support the management of Helm Chart, but this can be done well with Github, but it uses a graphical interface, which is very convenient for ordinary users, especially quasi-professionals in small and medium-sized enterprises.

Har will be transferred to CNCF management in the future as part of the cloud's native infrastructure. Some sponsored resources from CNCF have been received, and the project architecture and code have been adjusted. This will be a major benefit for the cloud native community and complements an important part of the cloud native architecture in addition to Kubernetes container orchestration management.

The official website of Harbor project, https://goharbor.io.

2. Deploy Harbor in Kubernetes

In Harbor version 1.6, the Helm Chart project has been changed and moved to the https://github.com/goharbor/harbor-helm subproject. At present, the development and adjustment is still relatively frequent, and there may be problems in use, so we need to pay attention to the development of the project and update the code in time. If there are any problems, you can submit them to issue to help improve the project.

Pull the container image in advance:

# Interface Service docker pull goharbor/harbor-ui:dev docker pull goharbor/harbor-adminserver:devdocker pull goharbor/harbor-portal:devdocker pull goharbor/harbor-jobservice:dev# Authorization Management docker pull goharbor/clair-photon:dev docker pull goharbor/notary-server-photon:devdocker pull goharbor/notary-signer-photon:dev# Image Service docker pull goharbor/registry-photon:dev docker pull goharbor/harbor-registryctl:devdocker pull goharbor/chartmuseum-photon:dev# Image Storage docker pull goharbor/harbor- Db:dev docker pull docker.io/bitnami/redis:4.0.9

The deployment steps are as follows:

# copy the deployment code. Git clone https://github.com/goharbor/harbor-helm# selects the version. Cd harbor-helmgit checkout master# can go in and modify the parameters in the values.yaml file. # Parameter reference: https://github.com/goharbor/harbor-helmhelm dependency update# is installed under the harbor namespace. Helm install-namespace harbor-name harbor. If there is an error or it is not needed, delete it. # helm delete-purge harbor

Some of the original deployment methods may no longer be applicable and are for reference only:

Kubernetes Image Repository-Helm deployment of Harbor

Deploy a highly available Harbor image repository on a Kubernetes cluster

Ubuntu installs private Docker Hub service Harbor

Configure Harbor private Docker mirroring service to use HTTPS

Modification of Docker image storage path for Harbor

Add CA root certificate to the operating system to gain trust

Harbor 1.6 already supports helm private server warehouse, which is quite convenient.

I used the above method to deploy and encountered some small pits.

Using Rook deployment, StorageClass rook-ceph-block later created the pvc successfully, but failed to mount it. This may be the reason for Ceph.

With NFS deployment, all were successful (after changing the "local" in chart/chartmuseum to local). However, there was an error on the login page. Invalid username and password were used to log in with admin/Harbor12345. The confirmation button cannot be activated by registering a new user.

It is estimated that these are all problems in the project adjustment, and a new Harbor will be ushered in after a while. Be patient for now.

3. Regular direct deployment

If the above method is not successfully deployed and is in a hurry to use, Harbor also supports regular deployment, which has been tested for a long time.

In this way, Harbor is installed in the Docker environment and does not use Kubernetes for management.

A, installation

Download the online installation package.

Https_proxy=192.168.199.99:9999 wget https://storage.googleapis.com/harbor-releases/release-1.6.0/harbor-online-installer-v1.6.0.tgz

Configure harbor deployment parameters.

Harbor.cfg file

At present, you can mainly configure hostname and use the ip of your own server.

Generate docker-compose file.

Sudo. / install.sh-with-clair-with-chartmuseumB, use

Landing

Use your browser to open the appropriate IP address.

The default password is admin/Harbor12345.

Thank you for reading, the above is the content of "how to deploy Harbor in Kubernetes". After the study of this article, I believe you have a deeper understanding of how to deploy Harbor in Kubernetes, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report