Creating image pull secrets for shared cluster components (Upgrading from Version 5.2 to Version 5.4)

If the scheduling service is installed on the cluster, you must create an image pull secret in the project where you plan to install the scheduling service. The image pull secret ensures that the scheduling service has access to the credentials for pulling images.

Upgrade phase
  • You are not here. Updating your client workstation
  • You are not here. Collecting required information
  • You are not here. Preparing to run an upgrade in a restricted network
  • You are not here. Preparing to run an upgrade from a private container registry
  • You are here icon. Preparing the cluster
  • You are not here. Preparing to upgrade an instance
  • You are not here. Upgrading an instance
  • You are not here. Setting up IBM® Software Hub
Who needs to complete this task?
Cluster administrator A cluster administrator must complete this task.
When do you need to complete this task?

Complete this task if the scheduling service is installed on the cluster.

You must create the image pull secret before you upgrade the scheduling service.

One-time setup Complete this task once for each cluster where you plan to upgrade the IBM Software Hub scheduling service.

Before you begin

Best practice: You can run the commands in this task exactly as written using the installation environment variables. Ensure that you added the new environment variables from Updating your environment variables script.

In addition, ensure that you source the environment variables before you run the commands in this task.

About this task

Procedure

  1. Log in to Red Hat® OpenShift® Container Platform as a user with sufficient permissions to complete the task.
    ${OC_LOGIN}
    Remember: OC_LOGIN is an alias for the oc login command.
  2. Create a file named dockerconfig.json based on where your cluster pulls images from:

    IBM Entitled Registry
    cat <<EOF > dockerconfig.json 
    {
      "auths": {
        "cp.icr.io": {
          "auth": "${IMAGE_PULL_CREDENTIALS}"
        },
        "icr.io":{
          "auth": "${IMAGE_PULL_CREDENTIALS}"
        }
      }
    }
    EOF

    Private container registry
    cat <<EOF > dockerconfig.json 
    {
      "auths": {
        "${PRIVATE_REGISTRY_LOCATION}": {
          "auth": "${IMAGE_PULL_CREDENTIALS}"
        }
      }
    }
    EOF

  3. Create the image pull secret in the project where the scheduling service is installed:
    oc create secret docker-registry ${IMAGE_PULL_SECRET} \
    --from-file ".dockerconfigjson=dockerconfig.json" \
    --namespace=${PROJECT_SCHEDULING_SERVICE}
  4. Create the image pull secret in the project where you plan to install the Backup Restore Orchestration service for the scheduling service:
    oc create secret docker-registry ${IMAGE_PULL_SECRET} \
    --from-file ".dockerconfigjson=dockerconfig.json" \
    --namespace=${PROJECT_SCHEDULING_BR_SVC}

What to do next

Now that you've created the image pull secret for the scheduling service, you're ready to complete Upgrading shared cluster components (Upgrading from Version 5.2 to Version 5.4).