Harbor Registry vSphere Pod experiences internal network timeouts ("context deadline exceeded", "i/o timeout") during image pushes on Supervisor
search cancel

Harbor Registry vSphere Pod experiences internal network timeouts ("context deadline exceeded", "i/o timeout") during image pushes on Supervisor

book

Article ID: 440930

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

Symptoms:

  • You are running the Harbor Supervisor Service (e.g., v2.14.2) on a vSphere with Tanzu Supervisor Cluster backed by VDS networking.
  • During large container image pushes (e.g., image layers of 200MB or larger), the harbor-registry vSphere pod experiences a permanent loss of internal cluster connectivity.
  • External network egress from the pod remains functional, but internal ClusterIP routing is blackholed.
  • The Harbor Registry application logs display repeating network timeout and DNS lookup errors, such as:
    • dial tcp: lookup harbor-redis on [CoreDNS-IP]:53: read udp [Pod-IP]:[Port]->[CoreDNS-IP]:53: i/o timeout
    • dial tcp [Redis-IP]:6379: context deadline exceeded
  • Running OS-level diagnostic commands within the harbor-registry pod (such as getent hosts harbor-redis or nc -w 2 harbor-redis 6379) consistently time out.
  • Neighboring pods in the same namespace (e.g., harbor-core) remain unaffected and continue to resolve internal DNS successfully.
  • Viewing the vSphere Pod resource usage directly within the vCenter Server UI reveals that the harbor-registry pod CPU utilization is pegged at or near 100%, even when the registry is completely idle.

Cause

The network collapse is caused by severe CPU starvation. The default CPU and Memory resource limits configured within the Harbor Supervisor Service package are undersized.

Resolution

To resolve this issue, you must manually update the Harbor Supervisor Service configuration to allocate appropriate resource limits and increase the Redis storage size.

 

Step 1: Prepare the Updated Configuration

Modify your Harbor Supervisor Service data values (YAML) to increase the CPU and Memory limits, as well as the Redis storage size. Apply the following recommended minimums:

From vCenter UI: Menu > Workload Management > Services > Harbor > Actions > Manage Service > Supervisor Link > harbor radial button > MANAGE > Next
 
resources:
containers: core: cpuRequest: 500m cpuLimit: 2000m memoryRequest: 512Mi memoryLimit: 4Gi database: cpuRequest: 1000m cpuLimit: 4000m memoryRequest: 1Gi memoryLimit: 4Gi redis: cpuRequest: 200m cpuLimit: 1000m memoryRequest: 256Mi memoryLimit: 2Gi registry: cpuRequest: 500m cpuLimit: 4000m memoryRequest: 512Mi memoryLimit: 6Gi persistence:
  persistentVolumeClaim:
    redis:
      existingClaim: ""
      storageClass: "insert-storage-class-name-here"
      subPath: ""
      accessMode: ReadWriteOnce
      size: 5Gi

Step 2: Address the Redis StatefulSet Immutability Error

Because Kubernetes StatefulSet volume claim templates are immutable, applying the updated storage size (e.g., expanding from 1Gi or 2Gi to 5Gi) will result in a package install (pkgi) error stating the update is Forbidden.

To allow the volume expansion to proceed, you must safely delete the existing Redis StatefulSet. 

  1. Connect to the Supervisor Cluster context using kubectl.
  2. Delete the Redis StatefulSet in the Harbor namespace (replace <harbor-namespace> with your actual namespace, e.g., svc-harbor-domain-c8): kubectl delete sts harbor-redis -n <harbor-namespace>

Step 3: Validation

Once the pkgi has reconciled (could take up to 10 minutes) and pods have restarted and stabilized:

  1. Verify in the vCenter UI that the idle CPU utilization for the harbor-registry pod has dropped significantly (typically below 10%).
  2. Perform a test push of a large container image (200MB+) to validate that the CPU usage scales appropriately (e.g., ~75%) and the internal DNS and Redis timeouts no longer occur.