Adding default route to image registry

Procedure

  1. Run the following command.
    oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
    The output is similar to:
    root@sys-backup-client1:~# oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
    config.imageregistry.operator.openshift.io/cluster patched
  2. Log in to the cluster by exporting the kubeadmin credentials.
    export KUBECONFIG=<installation_directory>/auth/kubeconfig
    For example,
    export KUBECONFIG=/ocp-tools/gi300-on-azure/auth/kubeconfig
  3. Run the following command.
    oc whoami
    The output is similar to:
    root@sys-backup-client1:/ocp-tools# oc whoami
    system:admin