Troubleshooting OpenShift Container Platform 4.x: Image Registry Operator

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Container Platform
    • 4.x

Issue

  • How do I troubleshoot issues with the image registry in Openshift 4

Diagnostic Steps

  • The registry operator reports status in two places:
    • A ClusterOperator resource is defined in the cluster scope which reflects the state of the registry operator at a high level.
# oc get clusteroperators.config.openshift.io/cluster-image-registry-operator -o yaml -n openshift-image-registry
  • The image-registry resource itself has a status section with detailed conditions indicating the state of the managed registry:
# oc get configs.imageregistry.operator.openshift.io/instance  -o yaml -n openshift-image-registry
  • If one cannot access your registry, check for a registry deployment and corresponding pod in the openshift-image-registry namespace:
# oc get deployment image-registry -n openshift-image-registry
# oc get pods -n openshift-image-registry | grep image-registry | grep -v operator
  • If there is no registry pod, check the deployment for any error conditions:
# oc get deployment image-registry -o yaml -n openshift-image-registry
  • If there is no registry deployment, check the image-registry resource instance for any error conditions:
# oc get configs.imageregistry.operator.openshift.io/instance -o yaml -n openshift-image-registry
  • If there is no image-registry resource at all, check if the image-registry operator deployment exists:
# oc get deployment/cluster-image-registry-operator -n openshift-image-registry
  • If the operator deployment exists, check for the corresponding pod and, if it exists, check its logs:
# oc get pods  -n openshift-image-registry | grep cluster-image-registry-operator
# oc logs cluster-image-registry-operator-5c8bcf89bb-4nr8p -n openshift-image-registry
  • If the operator pod does not exist, inspect the deployment to determine why the operator pod was not created:
# oc get deployment cluster-image-registry-operator -o yaml -n openshift-image-registry
  • If the deployment does not exist, then something is wrong at the installer/CVO level that it did not deploy the image-registry operator.

Associated Articles:
- image-registry operator reports that it is degraded due to StorageNotConfigured
- Failed to Configure NFS Share for image-registry Storage

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.