Setting Up and Configuring the Registry
Use this page to configure storage, Registry request behavior, service account pull credentials, image limits, and scheduled image cleanup for Alauda Container Platform Registry.
TOC
PrerequisitesConfigure Development StorageConfigure PVC StorageConfigure S3-Compatible Storage CredentialsConfigure Cloud Storage BackendsConfigure Request HandlingConfigure Managed Service Account Pull SecretsConfigure Image LimitsConfigure Scheduled Image PruningOperate StoragePrerequisites
- Registry is installed, and
Config/clusterexists. - You have permission to update
configs.imageregistry.operator.alauda.io,imagepruners.imageregistry.operator.alauda.io,LimitRange,ResourceQuota, and related Kubernetes resources. - For persistent storage, prepare the storage backend and required credentials before configuring
Config/cluster.
Configure Development Storage
Warning:
emptyDirstores image data on ephemeral Pod storage. It is deleted when the Registry Pod is removed from its node and cannot be used with more than one Registry replica. Use it only for development or test environments where all pushed image data can be discarded. Do not useemptyDirfor production or for any environment that must retain images.
Patch Config/cluster. The null fields remove mutually exclusive storage backends from the current configuration:
Verify the configuration and rollout:
Expected results:
Config/clusterreportsAvailable=True,Progressing=False, andDegraded=False.- The
image-registryDeployment rolls out successfully.
Configure PVC Storage
Use a persistent backend for production. The example uses ReadWriteOnce, one Registry replica, and
the Recreate rollout strategy required by the Operator for RWO storage. Create a file named
image-registry-pvc.yaml:
Apply the PVC:
Patch Config/cluster to use the PVC. Use a merge patch so that other Config/cluster.spec fields, such as routes or pull-secret settings, are not removed. The null fields remove mutually exclusive storage backends from the current configuration:
Verify the PVC, configuration, and rollout:
Expected results:
- The
image-registryPVC isBound. Config/clusterreportsAvailable=True,Progressing=False, andDegraded=False.- The
image-registryDeployment rolls out successfully.
Configure S3-Compatible Storage Credentials
Create the user-managed storage Secret before configuring Config/cluster. The Operator merges this Secret into the Registry private configuration:
Verify the Secret without printing its contents:
Expected results:
- The Secret exists in
image-registry-system. - The second command returns a non-zero byte count. Do not print or decode the Secret data.
Use disableRedirect: true when clients cannot reach the object storage endpoint directly and all content must be served through the Registry.
If the S3 endpoint uses a private CA, create the referenced ConfigMap with the required key:
Verify the ConfigMap key without displaying the certificate:
Expected result:
- The command returns a non-zero byte count for
ca-bundle.crt.
Patch Config/cluster. The null fields remove mutually exclusive storage backends from the current configuration:
The current operator supports the following storage fields: emptyDir, pvc, s3, swift, gcs,
ibmcos, and azure. Do not configure other storage fields.
Note: The
ConfigCRD also exposes astorage.ossfield, inherited from the upstream image registry operator. This operator does not implement it. Settingstorage.ossis treated as "no storage backend configured": the Operator reportsDegraded=Truewith reasonStorageNotConfigured, and the Registry data plane does not reconcile. Use only the seven supported fields listed above.
Verify the configuration and rollout:
Expected results:
Config/clusterreportsAvailable=True,Progressing=False, andDegraded=False.- The Registry logs do not show storage authentication, bucket, endpoint, or certificate errors.
Configure Cloud Storage Backends
The Operator can use Swift, GCS, IBM COS, or Azure storage when the corresponding platform
integration and credentials are available. Configure exactly one storage field in
Config/cluster.spec.storage; use the same merge-patch pattern shown above and set the other
supported storage fields to null.
Provider integrations can populate platform-specific values such as region, project, account, or
endpoint information. Confirm the required provider resources and credentials with the storage
administrator. After configuring a backend, verify the Config/cluster conditions and the Registry
rollout as shown in the storage procedures above. Do not print Secret data while troubleshooting.
Configure Request Handling
Use Config/cluster.spec.readOnly to reject image pushes and deletes. Use the requests settings
to limit concurrent reads and writes, queued requests, and queue wait time:
The proxy.http, proxy.https, and proxy.noProxy fields configure Registry egress when the
cluster proxy settings are not sufficient. logLevel accepts Normal, Debug, Trace, or
TraceAll. Resource requests and limits, node selection, tolerations, affinity, and topology spread
are also supported by Config/cluster.spec.
Verify request handling settings and the rollout:
Expected results:
Config/cluster.spec.readOnlyandConfig/cluster.spec.requestscontain the requested values.- The Registry Deployment rolls out successfully.
Configure Managed Service Account Pull Secrets
The Operator includes a managed imagePullSecret controller. When Config/cluster is managed, the controller can create, inject, refresh, and remove service account pull secrets for the internal registry.
Patch Config/cluster with additional hosts or ignored namespaces. The array fields in this patch replace the current arrays, so include every host and namespace that must remain configured:
Verify the configuration:
Expected result:
Config/cluster.spec.imagePullSecretcontains the configured management state, additional hosts, and ignored namespace settings.
The controller reconciles pull credentials asynchronously. Verify the managed RoleBinding and a ServiceAccount after the controller has had time to reconcile:
Expected results:
- The RoleBinding grants the
system:image-pullerClusterRole to service accounts in the namespace. - The ServiceAccount lists at least one managed pull Secret after asynchronous reconciliation.
- At least one Secret with the managed-pull-secret label exists. Use
kubectl get secretto inspect metadata only; do not print or decode credential data.
Configure Image Limits
In Registry, image size and tag-count limits are represented with
Kubernetes LimitRange and ResourceQuota objects.
Create a file named team-a-image-quota.yaml for namespace-level quota:
Apply the quota:
Create a file named team-a-image-limits.yaml for per-image and per-ImageStream limits:
Apply the limits:
Verify the quota and limits:
Expected results:
- The
ResourceQuotacontains the configured Image API limits. - The
LimitRangecontains the configuredalauda.io/Imageandalauda.io/ImageStreamlimits.
Configure Scheduled Image Pruning
Create or update the singleton ImagePruner/cluster to configure scheduled image pruning. Confirm the retention policy before enabling the schedule because pruning removes unused image metadata.
Create a file named image-pruner.yaml:
Apply the configuration:
Verify the pruner resource and rendered CronJob:
Expected results:
ImagePruner/clustercontains the configured schedule and retention policy.- The Operator renders the
image-prunerCronJob inimage-registry-system.
The generated CronJob runs ac adm prune images --confirm. When the Registry management state is
Managed, the Operator adds --prune-registry=true, so the scheduled job also performs registry
garbage collection after image metadata pruning. For a manually run prune, add
--prune-registry only when blob reclamation is intended; otherwise run garbage collection as a
separate reviewed operation.
For manual pruning and registry garbage collection commands, see Managing access and cleanup.
Operate Storage
For PVC-backed Registry storage:
Common actions:
- If a PVC is pending, check StorageClass, access mode, capacity, quotas, and events.
- If a Registry Pod cannot mount storage, check PV binding, node attachment, and backend storage availability.
- If image metadata exists but blob data is missing, verify whether the Registry used
emptyDiror whether the storage backend was changed. - Do not delete PVCs, PVs, or object storage data until the data retention decision is confirmed.