The embedded Harbor registry becomes inaccessible, resulting in HTTP 500 Internal Server Errors and health check failures.
Dependent Harbor pods (such as jobservice and registry) enter a CrashLoopBackOff state or fail with a connection refused error.
Checking the events and logs of the harbor-redis pod reveals the following errors:
MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk.
Furthermore, attempting to directly patch the PVC to expand capacity in this state will be rejected with an error indicating that the namespace quota has been exceeded.
Error from server (Forbidden): persistentvolumeclaims "<pvc-name>" is forbidden: exceeded quota: <namespace>-storagequota, requested: ... used: ... limited: ...
VMware vSphere with Tanzu 7.0.x
The Persistent Volume (PV) backing the Harbor Redis pod has reached 100% capacity, preventing Redis from saving background snapshots (bgsave).
This triggers the MISCONF state, disabling further write operations.
In vSphere 7.0, the implementation does not allow expanding the storage limit of the embedded Harbor registry from the vSphere Client UI, preventing standard offline PVC expansion operations.
Warning: This procedure scales down the Harbor Redis StatefulSet, which will temporarily interrupt access to the Harbor registry.
kubectl get pods -A -l component=redis
出力例:
NAMESPACE NAME READY STATUS RESTARTS AGE
vmware-system-registry-349###19 harbor-349###19-harbor-redis-0 1/1 Running 0 9d
kubectl get resourcequota -n <harbor-namespace name>
Example output:
NAME AGE REQUEST LIMIT
vmware-system-registry-349###19-storagequota 10d vsan-default-storage-policy.storageclass.storage.k8s.io/requests.storage: 200Gi/200Gi
kubectl edit resourcequota <ResourceQuota name> -n <harbor-namespace name>
Example output:
... (omitted)
spec:
hard:
vsan-default-storage-policy.storageclass.storage.k8s.io/requests.storage: 200Gi *Target for change
status:
hard:
vsan-default-storage-policy.storageclass.storage.k8s.io/requests.storage: 200Gi *Target for change
used:
vsan-default-storage-policy.storageclass.storage.k8s.io/requests.storage: 200Gi *The 200Gi in used is not included
After making changes, press Esc, then Shift + zz to save and exit.
kubectl get sts -n <harbor-namespace name> -l component=redis
Example output:
NAME READY AGE
harbor-349###19-harbor-redis 1/1 10d
kubectl scale sts <harbor-redis-statefulset名> -n <harbor-namespace名> --replicas=0
kubectl get pvc -n <harbor-namespace名> -l component=redis
出力例:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data-harbor-349###19-harbor-redis-0 Bound pvc-9aaa8930-493e-4957-9b42-026b9###1f3d 6G RWO vsan default storage policy 10d
kubectl patch pvc <redis-pvc名> -n <harbor-namespace名> -p '{"spec":{"resources":{"requests":{"storage":"18Gi"}}}}'Run `kubectl get pvc <redis-pvc name> -n <harbor-namespace> -o yaml | grep FileSystemResizePending -C 2`
and verify that the result includes `FileSystemResizePending`.
kubectl scale sts <harbor-redis-statefulset名> -n <harbor-namespace名> --replicas=1
kubectl exec -it <harbor-redis-pod名> -n <harbor-namespace名> -- df -h
出力例:
Filesystem Size Used Avail Use% Mounted on
overlay 253M 13M 239M 6% /
tmpfs 64M 0 64M 0% /dev
shm 64M 0 64M 0% /dev/shm
/dev/sda 253M 13M 239M 6% /dev/termination-log
/dev/sdb 18G 48K 18G 1% /var/lib/redis
Note: For vSphere 8.x environments, please follow the instructions for Expansion for registry PV for Harbor as as supervisor service.