Image Registry Replacement

For cross-cluster and cross-platform recovery scenarios, use this procedure to restore application images so they can pull from the correct repository after migration.

  • Image repository migration: When the image repository changes, update application image references to the new repository.
  • Image synchronization: When synchronizing images to other projects within the repository (for example, promoting from test to production), update application image references to the new version.

TOC

Procedure

  1. Before performing the recovery task, create a ConfigMap that maps old to new image repositories. Replace the placeholders in the following example and save as change-registry-config.yaml.

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: change-registry-config
      namespace: cpaas-system
      labels:
        velero.io/plugin-config: ""
        alauda.io/change-registry: RestoreItemAction
    data:
      old: <Old Image Repository Address>
      new: <New Image Repository Address>
  2. On a control-plane node of the target cluster, create the ConfigMap:

    kubectl apply -f change-registry-config.yaml
  3. After creation, continue with the application recovery task.