Tanzu RabbitMQ package reconciliation fails with ImagePullBackOff or version missing errors
search cancel

Tanzu RabbitMQ package reconciliation fails with ImagePullBackOff or version missing errors

book

Article ID: 438464

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

  • Tanzu RabbitMQ package reconciliation fails within Workload Cluster in VKS environments following the migration of assets to the Broadcom Support Portal.

  • When running the command kubectl get pkgi -A
    The following output is observed, indicating the package version cannot be resolved or is failing to deploy: 

    Reconcile failed: Expected to find at least one version, but did not
  • Or, it may display a generic error requiring further inspection: 

    Reconcile failed: Error (see .status.usefulErrorMessage for details)
  • Checking the underlying kapp controller logs or .status.usefulErrorMessage reports a timeout error waiting on specific resources: 

    kapp: Error: Timed out waiting after 15m0s for resources: [deployment/messaging-topology-operator (apps/v1) namespace: rabbitmq-system]
  • Running kubectl get pods -n rabbitmq-system reveals operator pods (such as messaging-topology-operator or standby-replication-operator) are stuck in an ImagePullBackOff state or missing entirely.

Cause

The tanzu-rabbitmq package fetches container images from a private Broadcom registry which utilizes a token-based authentication mechanism. When migrating from the legacy VMware registry, or when the 6-month Broadcom token expires, image pull requests fail. Furthermore, missing package repositories or strict Pod Security Admissions (PSA) blocking operator deployment cause the package reconciliation to continuously fail.

Resolution

Perform the following steps to update the repository, configure the image pull secret, and force the kapp-controller to reconcile successfully:

  1. Obtain a new Token from the Broadcom Support Portal.

    • Go to https://support.broadcom.com/

    • Navigate to My Downloads (left sidebar).

    • Search for RabbitMQ.

    • Select VMware Tanzu RabbitMQ for Kubernetes.

    • Click the Token Download icon to copy the new access token.

    Note: The token is valid for 6 months.

  2. Update the local PackageRepository to reference the Broadcom image registry. Run the following command, replacing <TARGET_PACKAGE_NAMESPACE> with the correct namespace where the package install resides:
    YAML:

    cat <<EOF | kubectl apply -f -
    apiVersion: packaging.carvel.dev/v1alpha1
    kind: PackageRepository
    metadata:
      name: tanzu-rabbitmq-repo-local
      namespace: <TARGET_PACKAGE_NAMESPACE>
    spec:
      fetch:
        imgpkgBundle:
          image: rabbitmq-kubernetes.packages.broadcom.com/tanzu-rabbitmq-package-repo:###
    EOF
  3. Update the image pull secret within the operator namespace (typically rabbitmq-system) using the new registry credentials. Replace <email> with the Broadcom account email and <new-token> with the generated token: 

    kubectl create secret docker-registry tanzu-rabbitmq-registry-creds -n rabbitmq-system \
      --docker-server=rabbitmq-kubernetes.packages.broadcom.com \
      --docker-username=<email> \
      --docker-password=<new-token>
  4. Apply the required security label to relax constraints for the operator pods so they are not blocked by standard Pod Security Admissions (PSA): 

    kubectl label --overwrite ns rabbitmq-system pod-security.kubernetes.io/enforce=privileged
  5. Reset the kapp-controller reconciliation state to clear the previous failure timeout. Run the following commands, replacing <PKGI_NAME> and <PKGI_NAMESPACE>: 

    # Cancel the stuck reconciliation attempt
    kubectl patch pkgi <PKGI_NAME> -n <PKGI_NAMESPACE> --type merge -p '{"spec":{"canceled":true}}'
    
    # Resume the package installation
    kubectl patch pkgi <PKGI_NAME> -n <PKGI_NAMESPACE> --type merge -p '{"spec":{"canceled":false}}'
    
    # Force a fresh synchronization
    kubectl annotate pkgi <PKGI_NAME> -n <PKGI_NAMESPACE> force-sync="$(date +%s)" --overwrite
  6. Verify the package successfully reconciles: 

    kubectl get pkgi <PKGI_NAME> -n <PKGI_NAMESPACE>

Confirm the output indicates Reconcile succeeded and that the pods in the rabbitmq-system namespace are in a Running state.

 

Additional Information

For more comprehensive details on retrieving the images and configuring access to the Broadcom registry, refer to the official documentation: