Registry v2: Image Registry Operator
The Image Registry Operator installs and manages the cluster-wide Registry v2 instance. It reconciles registry runtime resources from Config/cluster and scheduled pruning resources from ImagePruner/cluster.
TOC
Main ComponentsInstall the OperatorInstall from OperatorHubInstall by Using YAMLChange the Registry Management StateImage Pruner ReconciliationCheck Operator and Registry StatusCheck Registry Logs and Metrics AccessCommon Operator IssuesMain Components
Install the Operator
Install the Image Registry Operator from the web console when the Operator package is available in OperatorHub. Use the YAML path only for controlled automation, recovery, or support-guided installation when the web console is not available.
Do not use the legacy Registry Cluster Plugin to install Registry v2. The legacy Registry Cluster Plugin remains available only for legacy Registry deployments.
Install from OperatorHub
- Log in to and navigate to the Administrator page.
- In the left navigation bar, click Marketplace > OperatorHub.
- Search for Image Registry Operator or
cluster-image-registry-operator. - Click Install.
- On the installation page, use the following settings unless your release guidance states otherwise:
- Click Install.
- If an approval prompt appears, review and approve the generated install plan.
- Wait until the Operator status is Installed.
Verify the installation:
Expected results:
- The installed CSV is
Succeeded. - The
cluster-image-registry-operatorDeployment is available.
Install by Using YAML
Create the installation namespace if it does not exist:
Create a file named image-registry-operator-subscription.yaml:
Apply the Subscription:
Approve the generated InstallPlan:
Wait for the Operator:
Change the Registry Management State
Enable the Registry by setting Config/cluster.spec.managementState to Managed:
Verify that the Registry data plane is available:
Expected result:
Config/clusterreportsAvailable=True,Progressing=False, andDegraded=False.
Setting the management state to Removed stops Registry v2 runtime components. Push and pull traffic, the Image API server, and scheduled pruning are unavailable while the Registry is removed. Use this state only during a maintenance window or for support-guided recovery.
Before switching to Removed, back up required image data and inspect the storage management mode:
Only assume image data is retained when spec.storage.managementState is Unmanaged, or when the storage administrator has confirmed that the backend storage reclaim policy preserves the data after the Registry instance is removed.
To stop the Registry, set the management state to Removed:
Verify that the data-plane deployments are removed:
Expected result:
- The
image-registryandimage-api-serverDeployments are not present while the Registry is removed.
Image Pruner Reconciliation
The Operator reconciles the singleton ImagePruner/cluster into an image-pruner CronJob in image-registry-system. Configure the retention policy in the ImagePruner resource. See Setting up and configuring the registry.
The CronJob uses the Registry v2 internal service URL by default.
Check Operator and Registry Status
Expected results:
- The Operator CSV is
Succeeded. cluster-image-registry-operator,image-registry, andimage-api-serverare available.node-cais ready on target nodes.APIService/v1.image.alauda.ioisAvailable=True.Config/clusterreportsAvailable=True,Progressing=False, andDegraded=False.
Check Registry Logs and Metrics Access
Check Registry Pods:
View Registry logs:
Check metrics access from a monitoring service account: