Skip to content

Harbor

Prerequisites
  • postgres-operator is installed
  • An S3 compatible object store or persistent volumes are available to store image content

Deploy

karina.yml

harbor:
  replicas: 2
  bucket: karina-harbor-e2e
  version: v2.1.0
  s3:
    access_key: minio
    secret_key: minio123
    endpoint: http://minio.minio.svc:9000
postgresOperator:
  version: v1.3.4.flanksource.1

karina deploy harbor -c karina.yml

Warn

Persistent Volumes are not recommended due to the large number of files and directories that the docker registry creates

Backup

There are 2 components to the backup of Harbor:

1) The database is backed up on a regular basis using a Kubernetes cronjob to S3

2) The blobs themselves are not backed up, The underlying blob storage handles replication and recovery of blobs

Recovery

Run a database restore:

karina db restore --name postgres-harbor s3://path/to/logical_backup.tgz

Warning

After database restore it might be required to reset the admin password

Replication

(info) Should images/blobs be deleted from the primary instance and need to be recovered than a failover to the standby must take place which uses a different bucket.

Failover

Failover requires flipping the DNS endpoint and will invalidate existing tokens and and robot accounts potentially requiring recreation

Password Reset