Cloudera Cloud Factory and Anywhere Cloud endpoints fail after registry credential expiry

Cloudera Cloud Factory and Anywhere Cloud endpoints fail to pull container images after the registry credentials for container.repository.cloudera.com expire, because each cluster stores those credentials in a separate Kubernetes secret that you must update independently.

Condition

When paywall credentials for container.repository.cloudera.com expire or rotate without updating cluster secrets, Cloudera Cloud Factory and Anywhere Cloud clusters cannot pull container images. Because Cloudera Cloud Factory and Anywhere Cloud store registry credentials in separate Kubernetes secrets, updating only the Cloudera Cloud Factory secret does not restore Anywhere Cloud endpoints.

You might observe the following symptoms:

  • Cloudera Cloud Factory or Anywhere Cloud Flow Designer endpoints are unreachable.
  • Pods, such as taikun-db-pg and pgbouncer, remain in ImagePullBackOff, ErrImagePull, or CrashLoopBackOff states.
  • Running the kubectl describe pod command displays an HTTP 403 Forbidden error on a HEAD request to container.repository.cloudera.com.
  • The Kubernetes API server and etcd experience heavy load from failing taikun-alert-poller, billing, showback, and stripe job pods.

The following example shows a typical pod failure event:

Warning  Failed  34m (x37 over 3h19m)  kubelet  spec.containers{pgbouncer}:
Failed to pull image "container.repository.cloudera.com/cloudera_thirdparty/percona/percona-pgbouncer:1.24.1":
failed to resolve image: unexpected status from HEAD request to
https://container.repository.cloudera.com/v2/cloudera_thirdparty/percona/percona-pgbouncer/manifests/1.24.1:
403 Forbidden

Cause

The platform registry pull secrets contain expired or invalid credentials for container.repository.cloudera.com, which causes authenticated manifest requests to fail with an HTTP 403 Forbidden status:

  • Cloudera Cloud Factory cluster – uses the regcred secret in the flux-system namespace, which Kyverno and Flux propagate to the taikun namespace and other management namespaces.
  • Anywhere Cloud experience cluster – uses the awc-console-registry-creds secret in the awc-core namespace for Flow Designer workloads, which is isolated from Cloudera Cloud Factory flux-system secret propagation.

Additionally, failing taikun-alert-poller, billing, showback, and stripe CronJob pods generate excessive API server and etcd load that delays cluster recovery until you suspend the jobs and remove the stuck pods.

Recovering the Cloudera Cloud Factory management cluster

Before you begin, ensure that you have kubectl access and valid kubeconfig contexts for both the Cloudera Cloud Factory management cluster and the Anywhere Cloud cluster, and that you have obtained the updated container.repository.cloudera.com username and password from the Cloudera paywall or CHAMP. Run all commands in this procedure against the management cluster context.

  1. List the CronJobs in the taikun namespace by running the following command:
    kubectl get cronjobs -n taikun
  2. Suspend the polling and billing CronJobs to reduce load on the Kubernetes API server and etcd:
    kubectl patch cronjob taikun-alert-poller -n taikun -p '{"spec":{"suspend":true}}'
    kubectl patch cronjob taikun-billing-external -n taikun -p '{"spec":{"suspend":true}}'
    kubectl patch cronjob taikun-billing-infra -n taikun -p '{"spec":{"suspend":true}}'
    kubectl patch cronjob taikun-billing-internal -n taikun -p '{"spec":{"suspend":true}}'
    kubectl patch cronjob taikun-showback-poller -n taikun -p '{"spec":{"suspend":true}}'
  3. Delete the stuck and failed job pods in the taikun namespace:
    kubectl delete pods -n taikun -l app=taikun-alert-poller
    kubectl delete pods -n taikun -l app=taikun-billing
    kubectl delete pods -n taikun -l app=taikun-showback
    kubectl delete pods -n taikun -l app=taikun-stripe-poller
  4. Validate the new registry credentials by running the following command:
    export REG=container.repository.cloudera.com
    export REGUSER=username
    export REGPASS=password
    
    curl -sS -I -o /dev/null -w '%{http_code}\n' -u "$REGUSER:$REGPASS" \
      -H 'Accept: application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.list.v2+json' \
      "https://$REG/v2/cloudera_thirdparty/percona/percona-pgbouncer/manifests/1.24.1"

    Ensure that the command returns HTTP status code 200 before you proceed. If it returns 403, verify your paywall credentials.

  5. Create a YAML manifest file named regcred-flux-system.yaml with the updated credentials:
    apiVersion: v1
    kind: Secret
    metadata:
      name: regcred
      namespace: flux-system
    type: kubernetes.io/dockerconfigjson
    stringData:
      .dockerconfigjson: |
        {
          "auths": {
            "container.repository.cloudera.com": {
              "username": "username",
              "password": "password"
            }
          }
        }
  6. Apply the updated regcred secret to the flux-system namespace:
    kubectl apply --server-side --force-conflicts -f regcred-flux-system.yaml
  7. Confirm that the regcred secret exists in both the flux-system and taikun namespaces:
    kubectl get secret regcred -n flux-system
    kubectl get secret regcred -n taikun
  8. Verify that pods in the taikun namespace reach the Running state and that no 403 errors appear in recent events:
    kubectl get pods -n taikun
    kubectl describe pod -n taikun taikun-db-pg-pod-name
    kubectl get events -n taikun --sort-by='.lastTimestamp'
  9. Resume the suspended CronJobs in the taikun namespace after the cluster stabilizes:
    kubectl patch cronjob taikun-alert-poller -n taikun -p '{"spec":{"suspend":false}}'
    kubectl patch cronjob taikun-billing-external -n taikun -p '{"spec":{"suspend":false}}'
    kubectl patch cronjob taikun-billing-infra -n taikun -p '{"spec":{"suspend":false}}'
    kubectl patch cronjob taikun-billing-internal -n taikun -p '{"spec":{"suspend":false}}'
    kubectl patch cronjob taikun-showback-poller -n taikun -p '{"spec":{"suspend":false}}'

Recovering the Anywhere Cloud experience cluster

Run all commands in this procedure against the Anywhere Cloud cluster context. Updating the regcred secret in the Cloudera Cloud Factory flux-system namespace does not update the Anywhere Cloud cluster.

  1. Validate the refreshed registry credentials against container.repository.cloudera.com by running the following command:
    export REG=container.repository.cloudera.com
    export REGUSER=username
    export REGPASS=password
    
    curl -sS -I -o /dev/null -w '%{http_code}\n' -u "$REGUSER:$REGPASS" \
      -H 'Accept: application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.list.v2+json' \
      "https://$REG/v2/cloudera_thirdparty/percona/percona-pgbouncer/manifests/1.24.1"
  2. Inspect the existing awc-console-registry-creds secret in the awc-core namespace:
    kubectl get secret awc-console-registry-creds -n awc-core
    kubectl get secret awc-console-registry-creds -n awc-core \
      -o jsonpath='{.data.\.dockerconfigjson}' | base64 -d
  3. Create a YAML manifest file named awc-console-registry-creds.yaml using the identical username and password applied to the Cloudera Cloud Factory cluster:
    apiVersion: v1
    kind: Secret
    metadata:
      name: awc-console-registry-creds
      namespace: awc-core
    type: kubernetes.io/dockerconfigjson
    stringData:
      .dockerconfigjson: |
        {
          "auths": {
            "container.repository.cloudera.com": {
              "username": "username",
              "password": "password"
            }
          }
        }
  4. Apply the updated awc-console-registry-creds secret to the awc-core namespace:
    kubectl apply --server-side --force-conflicts -f awc-console-registry-creds.yaml
  5. Confirm that the awc-console-registry-creds secret reflects the updated credentials:
    kubectl get secret awc-console-registry-creds -n awc-core
    kubectl get secret awc-console-registry-creds -n awc-core \
      -o jsonpath='{.data.\.dockerconfigjson}' | base64 -d
  6. Force Kubernetes to re-pull the images by either deleting the failing pods or restarting the owning deployments in the awc-core namespace:
    • Delete the failing pods so that the controller recreates them:
      kubectl delete pod -n awc-core failing-pod-name
    • Restart the owning deployments:
      kubectl rollout restart deployment -n awc-core deployment-name
  7. Verify that pods in the awc-core namespace reach the Running state and that Flow Designer endpoints are accessible:
    kubectl get pods -n awc-core
    kubectl describe pod -n awc-core pod-name
    kubectl get events -n awc-core --sort-by='.lastTimestamp'