
Deploying and managing an OpenShift Container Registry is a crucial step in containerized application development. The registry is the central hub for storing and managing container images.
You can create a new OpenShift project to deploy the registry, which will then be accessible through the web console or CLI. This allows for easy management and scaling of the registry.
The registry is highly available by default, with a replicated architecture that ensures data consistency across all nodes. This means that even if one node fails, the registry remains accessible.
To manage the registry, you can use the OpenShift CLI to create and manage repositories, as well as push and pull images. This provides a flexible and scalable way to manage your container images.
Explore further: Docker Azure Cli Container
Chapter 1. Overview
OpenShift Container Platform can utilize any server implementing the container image registry API as a source of images, including the Docker Hub, private registries run by third parties, and the integrated OpenShift Container Platform registry.
Curious to learn more? Check out: Ocp Openshift

You can use OpenShift Container Platform to build images from your source code, deploy them, and manage their lifecycle.
OpenShift Container Platform provides an internal, integrated container image registry that can be deployed in your environment to locally manage images.
This internal image registry is a powerful tool for managing your container images, allowing you to keep them private and secure within your own environment.
OpenShift Container Platform offers a range of registry options, including the integrated registry, Docker Hub, and private registries run by third parties.
Discover more: Openshift Platform plus
Configuration
The Image Registry Operator configuration parameters allow you to customize the behavior of your OpenShift Container Registry. You can set the managementState parameter to Managed, Unmanaged, or Removed to control how the Operator updates the registry.
The logLevel parameter sets the logging level of the registry instance, with supported values including Normal. The httpSecret parameter generates a value needed by the registry to secure uploads. The proxy parameter defines the Proxy to be used when calling the master API and upstream registries.
Here are the available storage configuration parameters for the Image Registry Operator:
The Image Registry Operator is not initially available for platforms that do not provide default storage, so you'll need to configure your registry to use storage after installation.
Chapter 3. Setup
In Chapter 3, Setup, we'll cover the essential steps to get your system configured.
First, ensure you have a stable internet connection, as mentioned in the article section "Network Requirements", which recommends a minimum speed of 10 Mbps for smooth performance.
Having a reliable power source is crucial, so make sure your system is plugged into a surge protector or a high-quality power strip, as advised in the "Power Management" section.
The recommended setup for your system involves connecting all necessary peripherals, such as your keyboard, mouse, and monitor, as described in the "Hardware Configuration" section.
Make sure to update your system's BIOS to the latest version, as this will ensure optimal performance and compatibility with your hardware, according to the "BIOS Updates" section.
The default settings for your system's configuration can be found in the "Default Configuration" section, which provides a starting point for customizing your setup.
By following these steps, you'll be well on your way to a solid foundation for your system's configuration.
Configuration Parameters
When configuring the Image Registry Operator, you'll need to consider several parameters to ensure your registry runs smoothly. The configs.imageregistry.operator.openshift.io resource offers a range of configuration parameters to fine-tune your registry.
The managementState parameter determines how the Operator interacts with the registry, offering three options: Managed, Unmanaged, and Removed. The logLevel parameter sets the log level of the registry instance, with supported values including Normal.
The httpSecret parameter generates a value needed by the registry to secure uploads, while the proxy parameter defines the Proxy to be used when calling the master API and upstream registries. Storage type details are configured through the storage parameter, which can be set to S3 bucket coordinates.
The readOnly parameter indicates whether the registry instance should reject attempts to push new images or delete existing ones. API Request Limit details are controlled through the requests parameter, which determines how many parallel requests a given registry instance will handle before queuing additional requests.

The defaultRoute parameter determines whether an external route is defined using the default hostname, with re-encrypt encryption enabled by default. The routes parameter allows you to create additional routes, providing the hostname and certificate for each route.
The replicas parameter sets the replica count for the registry, while the disableRedirect parameter controls whether to route all data through the registry or redirect to the backend. The spec.storage.managementState parameter is set by the Image Registry Operator to Managed on new installations or upgrades of clusters using installer-provisioned infrastructure on AWS or Azure.
Here are the configuration parameters for AWS S3 registry storage:
Platforms
OpenShift Container Registry is a robust platform that supports multiple deployment environments. It's available on OpenShift Online, OpenShift Dedicated, and OpenShift Origin.
You can access the Container Registry through the OpenShift web console or the Docker command-line interface. This flexibility allows you to work with the tool that you're most comfortable with.
OpenShift Container Registry supports both Docker and OCI (Open Container Initiative) image formats. This support ensures that you can work with a wide range of container images.
Cloud Platforms & OpenStack
Cloud platforms and OpenStack offer a range of options for configuring image registry storage. The Image Registry Operator installs a single instance of the OpenShift Container Platform registry and manages all registry configuration.
You might like: Run Docker Image from Azure Container Registry
If you're installing an installer-provisioned infrastructure cluster on AWS, GCP, Azure, or OpenStack, storage is automatically configured. However, if you're installing on AWS or Azure, the Image Registry Operator sets the spec.storage.managementState parameter to Managed, but if it's set to Unmanaged, the Operator takes no action related to storage.
The Image Registry Operator creates a default configs.imageregistry.operator.openshift.io resource instance based on configuration detected in the cluster, and if insufficient information is available, the incomplete resource will be defined and the Operator will update the resource status with information about what is missing.
The Image Registry Operator runs in the openshift-image-registry namespace, managing the registry instance and all configuration and workload resources for the registry reside in that namespace.
Here's a summary of how the Image Registry Operator's behavior affects image pruner management:
Bare Metal and Manual Installations
To configure your registry to use storage on a bare metal and manual installation, you must have access to the cluster as a user with the cluster-admin role. This is a crucial requirement to ensure you can perform the necessary actions.
You'll need to provision persistent storage for your cluster, such as Red Hat OpenShift Container Storage, which must have a capacity of 100Gi. This is a must-have for the registry to function properly.
To configure your registry, change the spec.storage.pvc in the configs.imageregistry/cluster resource. This is a simple yet important step to get your registry up and running.
When using shared storage, review your security settings to prevent outside access. This is a critical step to ensure your registry remains secure.
If you don't have a registry pod, you can continue with the procedure. To check if you have a registry pod, run the command $ oc get pod -n openshift-image-registry -l docker-registry=default. If you do have a registry pod, you don't need to proceed with this procedure.
To check the registry configuration, run the command $ oc edit configs.imageregistry.operator.openshift.io. This will allow you to review and modify the registry configuration as needed.
Here are the steps to configure your registry to use storage:
- Change the spec.storage.pvc in the configs.imageregistry/cluster resource.
- Verify that you don't have a registry pod.
- Check the registry configuration.
- Check the clusteroperator status.
- Ensure that your registry is set to managed.
Registry

The OpenShift Container Platform provides an internal, integrated container image registry that can be deployed in your OpenShift Container Platform environment to locally manage images.
This registry can be used to build images from your source code, deploy them, and manage their lifecycle. OpenShift Container Platform can handle the entire process, from building to deployment.
You can configure the registry of a cluster that runs on your own Red Hat OpenStack Platform (RHOSP) infrastructure. This allows for more control and customization of the registry.
Here are the requirements for configuring registry storage for RHOSP with user-provided infrastructure:
- A cluster on Red Hat OpenStack Platform (RHOSP) with user-provided infrastructure.
- You need to provide Registry Operator cloud credentials.
- For Swift on RHOSP storage, the secret is expected to contain the following two keys:
Chapter 2
The registry is a centralized database that stores information about computer hardware, software, and settings. It's like a library where your computer keeps track of everything it knows.
A registry key is a container that holds related settings and values. These keys are organized in a hierarchical structure, with parent keys containing subkeys.
The registry is divided into five main hives: HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, and HKEY_PERFORMANCE_DATA. Each hive has its own unique purpose and contains different types of data.
Editing the registry can be a delicate process, as it's easy to make mistakes that can cause system crashes or other issues. This is why it's often recommended to create a backup of the registry before making any changes.
The registry is constantly being updated by Windows and other programs, which can sometimes lead to errors or inconsistencies. This is known as a registry corruption.
Discover more: Onedrive Registry Keys
User-Provisioned Infrastructure Registry
You can configure the registry of a cluster that runs on your own Red Hat OpenStack Platform (RHOSP) infrastructure. This allows you to customize the registry settings to suit your specific needs.
To configure registry storage for RHOSP, you need to provide Registry Operator cloud credentials. This is a crucial step in setting up a secure and reliable registry.
A cluster on Red Hat OpenStack Platform (RHOSP) with user-provided infrastructure requires cloud credentials to be provided for the Registry Operator.
For Swift on RHOSP storage, the secret is expected to contain the following two keys:
You can also configure registry storage for AWS with user-provisioned infrastructure. During installation, your cloud credentials are sufficient to create an Amazon S3 bucket and the Registry Operator will automatically configure storage.
Quay
Quay is a container image registry that offers enterprise-quality features. Red Hat Quay is available both as a hosted service and as software you can install in your own data center or cloud environment.
Red Hat Quay registries include advanced features like geo-replication, image scanning, and the ability to roll back images. These features make it a reliable choice for managing container images.

You can set up your own hosted Quay registry account by visiting the Quay.io site. After that, follow the Quay Tutorial to log in to the Quay registry and start managing your images.
Red Hat Quay registries can be accessed from OpenShift Container Platform like any remote container image registry. This allows for seamless integration and management of container images.
Glossary
The OpenShift Container Registry has its own set of terminology, and understanding these terms is essential for navigating the registry content.
The glossary defines common terms used in the registry content.
One of the key terms is the registry itself, which is a central location for storing and managing container images.
The OpenShift Container Platform registry is specifically designed for OpenShift Container Platform users.
Another important term is the image registry, which is a repository for storing and retrieving container images.
The OpenShift image registry is specifically designed for OpenShift users.
The registry content refers to the actual images, manifests, and other metadata stored within the registry.
These terms are crucial for understanding how the registry works and how to use it effectively.
A different take: Openshift Platform as a Service
Frequently Asked Questions
What does a container registry do?
A container registry stores and shares container images, allowing developers to easily upload and download them between systems. It serves as a central hub for managing and distributing container images.
Sources
- https://docs.openshift.com/container-platform/3.11/architecture/infrastructure_components/image_registry.html
- https://docs.redhat.com/en/documentation/openshift_container_platform/4.10/html/registry/registry-overview-1
- https://docs.redhat.com/en/documentation/openshift_container_platform/4.8/html-single/registry/index
- https://communities.sas.com/t5/Administration-and-Deployment/Creating-Viya4-SAS-Container-Registry-in-Redhat-Openshift/td-p/870685
- https://docs.openshift.com/container-platform/4.8/registry/index.html
Featured Images: pexels.com