Unable to increase Harbor registry storage to 2TB From default 200 GB
search cancel

Unable to increase Harbor registry storage to 2TB From default 200 GB

book

Article ID: 332724

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
You are unable to deploy an embedded Harbor registry on vSphere UI with bigger storage capacity other than the default 200 GB.

Environment

VMware vSphere ESXi 7.0.x

Cause

The embedded Harbor registry on a vSphere Kubernetes cluster that is enabled via UI always has a default storage capacity of 200GB. If you want to have a bigger storage capacity for the embedded Harbor registry, the harbor registry has to be created using API.

Resolution

Follow the example below to create the embedded Harbor registry with bigger storage capacity on a vSphere Kubernetes cluster:

1. Navigate to Developer Center and go to API Explorer on vSphere UI.

2. Select vCenter in the select API drop down box, and invoke GET `namespace_management/clusters` to find out the cluster ID that the embedded Harbor registry should be created on.

3. Invoke GET `namespace_management/clusters/{cluster-ID}` to find out the storage policy ID that can be used in the cluster.

4. Invoke POST `content/registries/harbor` to deploy the embedded Harbor registry on the cluster with a request body like below. This will create a Harbor registry with 400GB storage capacity:
{
  "cluster": "<cluster-ID},
  "storage": [ {
        "limit": 409600,
        "policy": "<storage-policy-ID>"
    } ]
}


5. Navigate to the cluster Configure > Namespaces -> Image Registry UI, and wait for the registry health status to become running, and the storage capacity should show as 400 GB.