Updating Public Repository Credentials

Overview

The Public Repository is a platform-provided image registry service available on the public internet. When you want your clusters to use the Public Repository as their image registry, you need to update the built-in public-registry-credential Cloud Credentials. This ensures your platform has permission to pull images from the public registry.

public-registry-credential is the platform's built-in registry credential, and its effect is not limited to clusters configured to use the Public Repository. When the platform registry requires authentication, a cluster provisioned through an Immutable Infrastructure provider resolves its platform image source from this credential unless it references one of its own. Updating this credential therefore affects those clusters as well. (When the platform registry is anonymous, this credential is not populated and those clusters resolve their registry from the address recorded at installation time, so an update here does not reach them.)

List the clusters that would be affected before you change the contents — they are the ones with no registry reference of their own:

kubectl get cluster.platform.tkestack.io \
  -o custom-columns='NAME:.metadata.name,REGISTRY_REFERENCE:.metadata.labels.cpaas\.io/registry-reference'

Any cluster showing <none> in the second column inherits this credential.

Giving a cluster its own registry credential

A cluster can be bound to a registry credential of its own instead of inheriting this one, so that it pulls platform images from a registry closer to it. The binding is chosen when the cluster is created and cannot be changed afterwards. See Choose the Image Registry for a Workload Cluster.

Procedure

  1. Log in to the Customer Portal and download your organization's authentication file from the Enterprise Management section located in the User Information dropdown in the upper right corner.

  2. Navigate to Clusters > Cloud Credential in the left navigation bar of the Administrator console.

  3. Locate the cloud credential named public-registry-credential and click Update from the dropdown menu on the right.

  4. In the Upload Public Repository Address section, upload the authentication file you downloaded from the Customer Portal.

  5. Click Update to apply the changes.