Skip to content

Instantly share code, notes, and snippets.

@taking
Last active December 2, 2022 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taking/0df95d08f526aea150527fd16e9f9e19 to your computer and use it in GitHub Desktop.
Save taking/0df95d08f526aea150527fd16e9f9e19 to your computer and use it in GitHub Desktop.

Harbor Installation with Helm

  • Harbor on Kubernetes

Prerequisites

helm update

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

install

TLS
_HARBOR="reg.dev-t.xyz"
_NOTARY="notary.dev-t.xyz"
cat <<EOF > harbor-values.yaml
externalURL: https://${_HARBOR}
expose:
  type: ingress
  tls:
    enabled: true
  ingress:
    hosts:
      core: ${_HARBOR}
      notary: ${_NOTARY}
    annotations:
      kubernetes.io/ingress.class: "nginx"    
      kubernetes.io/tls-acme: "true"
      cert-manager.io/cluster-issuer: "letsencrypt-staging"
      nginx.ingress.kubernetes.io/ssl-redirect: 'true'
      nginx.ingress.kubernetes.io/backend-protocol: 'HTTPS'
EOF
helm install harbor harbor/harbor \
    --create-namespace \
    --namespace harbor \
    -f harbor-values.yaml
How-to
  • Dashboard : https://${_HARBOR}
  • Notary : https://${_NOTARY}
  • the default administrator username and password are admin and Harbor12345

Non-TLS
helm install harbor harbor/harbor \
    --create-namespace \
    --namespace harbor \
    --set expose.type=nodePort \
    --set expose.tls.enabled=false \
    --set externalURL="http://$(curl ifconfig.me --silent):30002"
How-to
  • Dashboard : http://{yourIP}:30002
  • the default administrator username and password are admin and Harbor12345

ScreenShot

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment