bitnamicharts/harborHarbor is an open source trusted cloud-native registry to store, sign, and scan content. It adds functionalities like security, identity, and management to the open source Docker distribution.
Overview of Harbor
consolehelm install my-release oci://registry-1.docker.io/bitnamicharts/harbor
Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise OS Photon Linux. Why choose BSI images?
Each image comes with valuable security metadata. You can view the metadata in our public catalog here. Note: Some data is only available with commercial subscriptions to BSI.
!Alt text !Alt text
If you are looking for our previous generation of images based on Debian Linux, please see the Bitnami Legacy registry.
This Helm chart installs Harbor in a Kubernetes cluster.
This Helm chart has been developed based on goharbor/harbor-helm chart but includes some features common to the Bitnami chart library. For example, the following changes have been introduced:
To install the chart with the release name my-release:
consolehelm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/harbor
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset values, which automatically sets the resources section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
This chart can be integrated with Prometheus by setting metrics.enabled to true. This will expose the Harbor native Prometheus port in both the containers and services. The services will also have the necessary annotations to be automatically scraped by Prometheus.
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the Bitnami Prometheus helm chart or the Bitnami Kube Prometheus helm chart to easily have a working Prometheus in your cluster.
The chart can deploy ServiceMonitor objects for integration with Prometheus Operator installations. To do so, set the value metrics.serviceMonitor.enabled=true. Ensure that the Prometheus Operator CustomResourceDefinitions are installed in the cluster or it will fail with the following error:
textno matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
Install the Bitnami Kube Prometheus helm chart for having the necessary CRDs and the Prometheus Operator.
You can expose Harbor core using two methods:
exposureType should be set to ingress.
exposureType should be set to proxy. There are three ways to do so depending on the NGINX Proxy service type:
NodeIP:NodePort.The external URL for Harbor core service is used to:
Format: protocol://domain[:port]. Usually:
domain should be the value of ingress.core.hostname.ClusterIP service type, the domain should be the value of service.clusterIP.NodePort service type, the domain should be the IP address of one Kubernetes node.Load*** service type, set the domain as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider.If Harbor is deployed behind the proxy, set it as the URL of proxy.
In order to update the database schema, the helm chart deploys a special Job that performs the migration. Enable this by setting the migration.enabled=true value.
This Job relies on helm hooks, so any upgrade operation will wait for this Job to succeed.
It is possible to configure TLS communication in the core, jobservice, portal, registry and trivy components by setting internalTLS.enabled=true. The chart allows two configuration options:
*.tls.existingSecret (under the core, jobservice, portal, registry and `trivy' sections) values.*.tls.existingSecret values.Additionally, it is possible to add a custom authority to each component trust store. This is done using the internalTLS.caBundleSecret value with the name of a secret containing the corresponding ca.crt file.
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.
If you have a need for additional containers to run within the same pod as any of the Harbor components (e.g. an additional metrics or logging exporter), you can do so via the sidecars config parameter inside each component subsection. Simply define your container according to the Kubernetes container spec.
yamlcore: sidecars: - name: your-image-name image: your-image imagePullPolicy: Always ports: - name: portname containerPort: 1234
Similarly, you can add extra init containers using the initContainers parameter.
yamlcore: initContainers: - name: your-image-name image: your-image imagePullPolicy: Always ports: - name: portname containerPort: 1234
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the extraEnvVars property inside each component subsection.
yamlcore: extraEnvVars: - name: LOG_LEVEL value: error
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the extraEnvVarsCM or the extraEnvVarsSecret values inside each component subsection.
StorageClass is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the storageClass or set existingClaim if you have already existing persistent volumes to use.azure, gcs, s3 swift and oss.core.secret, jobservice.secret and registry.secret to configure then statically through the helm values. it expects the "key or password", not the secret name where secrets are stored.core.secretName to configure.Secrets and certificates must be setup to avoid changes on every Helm upgrade (see: #107).
If you want to manage full Secret objects by your own, you can use existingSecret & existingEnvVarsSecret parameters. This could be useful for some secure GitOps workflows, of course, you will have to ensure to define all expected keys for those secrets.
The core service have two Secret objects, the default one for data & communication which is very important as it's contains the data encryption key of your harbor instance ! and a second one which contains standard passwords, database access password, ...
Keep in mind that the HARBOR_ADMIN_PASSWORD is only used to boostrap your harbor instance, if you update it after the deployment, the password is updated in database, but the secret will remain the initial one.
This chart allows you to set your custom affinity using the XXX.affinity parameter(s). Find more information about Pod's affinity in the kubernetes documentation.
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the bitnami/common chart. To do so, set the XXX.podAffinityPreset, XXX.podAntiAffinityPreset, or XXX.nodeAffinityPreset parameters.
As the images run as non-root by default, it is necessary to adjust the ownership of the persistent volumes so that the containers can write data into it.
By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
You can enable this initContainer by setting volumePermissions.enabled to true.
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.defaultStorageClass | Global default StorageClass for Persistent Volume(s) | "" |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
| Name | Description | Value |
|---|---|---|
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override common.names.fullname template with a string | "" |
apiVersions | Override Kubernetes API versions reported by .Capabilities | [] |
kubeVersion | Override Kubernetes version reported by .Capabilities | "" |
clusterDomain | Kubernetes Cluster Domain | cluster.local |
commonAnnotations | Annotations to add to all deployed objects | {} |
commonLabels | Labels to add to all deployed objects | {} |
extraDeploy | Array of extra objects to deploy with the release (evaluated as a template). | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the chart release | ["sleep"] |
diagnosticMode.args | Args to override all containers in the chart release | ["infinity"] |
| Name | Description | Value |
|---|---|---|
adminPassword | The initial password of Harbor admin. Change it from portal after launching Harbor | "" |
existingSecret | Name of existing Secret containing the Harbor admin password | "" |
existingSecretAdminPasswordKey | Name of the key inside the existing secret containing the Harbor admin password (HARBOR_ADMIN_PASSWORD as default if not provided) | "" |
externalURL | The external URL for Harbor Core service | [***] |
proxy.httpProxy | The URL of the HTTP proxy server | "" |
proxy.httpsProxy | The URL of the HTTPS proxy server | "" |
proxy.noProxy | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal |
proxy.components | The component list that the proxy settings apply to | ["core","jobservice","trivy"] |
logLevel | The log level used for Harbor services. Allowed values are [ fatal | error | warn | info | debug | trace ] | debug |
internalTLS.enabled | Use TLS in all the supported containers: core, jobservice, portal, registry and trivy | false |
internalTLS.caBundleSecret | Name of an existing secret with a custom CA that will be injected into the trust store for core, jobservice, registry, trivy components | "" |
ipFamily.ipv6.enabled | Enable listening on IPv6 ([::]) for NGINX-based components (NGINX,portal) | true |
ipFamily.ipv4.enabled | Enable listening on IPv4 for NGINX-based components (NGINX,portal) | true |
cache.enabled | Enable caching manifests in Redis for better performance on high concurrent pulling | false |
cache.expireHours | The time (in hours) to keep the cache | 24 |
database.maxIdleConns | The maximum number of connections in the idle connection pool per component | 100 |
database.maxOpenConns | The maximum number of open connections to the database per component | 900 |
| Name | Description | Value |
|---|---|---|
exposureType | The way to expose Harbor. Allowed values are [ ingress | proxy | none ] | proxy |
service.type | NGINX proxy service type | Load*** |
service.ports.http | NGINX proxy service HTTP port | 80 |
service.ports.https | NGINX proxy service HTTPS port | 443 |
service.nodePorts.http | Node port for HTTP | "" |
service.nodePorts.https | Node port for HTTPS | "" |
service.sessionAffinity | Control where client requests go, to the same pod or round-robin | None |
service.sessionAffinityConfig | Additional settings for the sessionAffinity | {} |
service.clusterIP | NGINX proxy service Cluster IP |
_Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at [***]
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务