Update the global pull secret when transferring cluster ownership

To transfer a connected cluster to a new owner, you must update the cluster’s pull secret to the new owner’s pull secret. Do this within five days of initiating the transfer in OpenShift Cluster Manager, or you must restart the transfer process.

Before you begin

  • You must be the Cluster Owner or an Organization Administrator.
  • You must have access to the cluster as a user with the cluster-admin role. See Authentication and authorization in the OpenShift Container Platform documentation for more information about cluster roles.
  • You must have initiated the cluster ownership transfer within the last five days.

About this task

Important

On clusters using OpenShift Container Platform versions earlier than 4.7.4, cluster resources must adjust to the new pull secret. This can temporarily limit the usability of the cluster. This occurs because updating the pull secret causes the Machine Config Operator to drain the nodes, apply the change, and uncordon the nodes.

This does not affect clusters using OpenShift Container Platform versions 4.7.4 and later, where a pull secret change does not cause a node drain or reboot.

Procedure

  1. As the user who is taking ownership of the cluster (the target account):
    1. Log into OpenShift Cluster Manager.
    2. Download or copy your pull secret from the Downloads page under Tokens.
      Important

      Do not share your pull secret. The pull secret should be treated like a password.

  2. Run the following command using the pull secret you downloaded from OpenShift Cluster Manager to change the cluster’s pull secret:
    # oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=pull-secret.txt

    If a secret is not already created, run the following command to create the secret:

    # oc create secret generic pull-secret -n openshift-config --type=kubernetes.io/dockerconfigjson --from-file=.dockerconfigjson=/path/to/downloaded/pull-secret

    This begins updates to all nodes in the cluster, which can take some time depending on the size of your cluster.