Creating image pull secrets for shared cluster components

If you plan to install the scheduling service, you must create image pull secrets in the projects where you plan to install the scheduling service and the Backup Restore Orchestration service. The image pull secrets ensure that the scheduling service and the Backup Restore Orchestration service have access to the credentials for pulling images.

Installation phase
  • You are not here. Setting up a client workstation
  • You are not here. Setting up a cluster
  • You are not here. Collecting required information
  • You are not here. Preparing to run installs in a restricted network
  • You are not here. Preparing to run installs from a private container registry
  • You are here icon. Preparing the cluster for IBM Software Hub
  • You are not here. Preparing to install an instance of IBM Software Hub
  • You are not here. Installing an instance of IBM Software Hub
  • You are not here. Setting up the control plane
  • You are not here. Installing solutions and services
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 you plan to install the scheduling service.

You must create the image pull secret before you install the scheduling service and the Backup Restore Orchestration service.

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

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in 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 you plan to install the scheduling service:
    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 Installing shared cluster components for IBM Software Hub.