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 harbor is installed and used in kubernetes helm

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

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about how harbor is installed and used in kubernetes helm. Many people may not know much about it. In order to let you know more, Xiaobian summarizes the following contents for you. I hope you can gain something according to this article.

Environment: kubernetes 1.18+, helm3

Add Harbor's Helm repository

helm repo add harbor https://helm.goharbor.iohelm repo update

Creating a namespace

kubectl create namespace harbor-system

Create harbor-overrides.yaml. The export type is modified to clusterIP, and then the external network will be exported with traefik and the certificate will be automatically managed. PVC will be modified according to the actual situation. Storage scheme reference my https://my.oschina.net/u/160697/blog/4422610

externalURL: https://registry.your_domain.com:31000expose: type: clusterIP tls: auto: commonName: harborpersistence: persistentVolumeClaim: registry: storageClass: rook-cephfs accessMode: ReadWriteMany size: 1024Gi chartmuseum: storageClass: rook-cephfs accessMode: ReadWriteMany jobservice: storageClass: rook-cephfs accessMode: ReadWriteMany database: storageClass: rook-cephfs accessMode: ReadWriteMany redis: storageClass: rook-cephfs accessMode: ReadWriteMany trivy: storageClass: rook-cephfs accessMode: ReadWriteMany

Installation, to pull the mirror, start more than 10 containers need to wait, you can also delete the pod try

helm install -f harbor-overrides.yaml --namespace harbor-system harbor harbor/harbor

upgrade

helm upgrade -f harbor-overrides.yaml --namespace harbor-system harbor harbor/harbor

uninstall

helm uninstall harbor -n harbor-system#Delete namespace, delete storage with # kubectl delete ns harbor-system

Export traefik. Refer to https://my.oschina.net/u/160697/blog/4437939

kind: IngressapiVersion: networking.k8s.io/v1beta1metadata: name: harbor-ingress namespace: harbor-system annotations: traefik.ingress.kubernetes.io/router.tls: "true" traefik.ingress.kubernetes.io/router.entrypoints: websecure traefik.ingress.kubernetes.io/router.tls.certresolver: aliyun traefik.ingress.kubernetes.io/router.tls.domains.0.main: registry.your_domain.comspec: rules: - host: registry.your_domain.com http: paths: - path: / pathType: ImplementationSpecific backend: serviceName: harbor-harbor-portal servicePort: 80 - path: /api/ pathType: ImplementationSpecific backend: serviceName: harbor-harbor-core servicePort: 80 - path: /service/ pathType: ImplementationSpecific backend: serviceName: harbor-harbor-core servicePort: 80 - path: /v2/ pathType: ImplementationSpecific backend: serviceName: harbor-harbor-core servicePort: 80 - path: /chartrepo/ pathType: ImplementationSpecific backend: serviceName: harbor-harbor-core servicePort: 80 - path: /c/ pathType: ImplementationSpecific backend: serviceName: harbor-harbor-core servicePort: 80

Log in to https://registry.your_domain.com:31000. The default password is admin/Harbor12345. Create a separate account password to use, do not write the details.

Used in Docker. Enter docker login and enter your account password. Then you can docker tag. Docker push is OK.

#Enter account password sudo docker login After reading the above content, do you have any further understanding of how harbor is installed and used in kubernetes helm? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

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