For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Migrate Installation Images from Ubuntu to UBI

To migrate MongoDB Controllers for Kubernetes Operator from Ubuntu-based images to UBI-based images, edit your Kubernetes Operator configuration file to pull images from the appropriate UBI repositories by suffixing the existing image repository path with -ubi. You don't need to perform this procedure if you are using OpenShift, as you are already using UBI images.

The following example compares a default configuration for the INIT_APPDB_IMAGE_REPOSITORY setting with an updated configuration that pulls a UBI image.

Example

1spec:
2 template:
3 spec:
4 serviceAccountName: mongodb-kubernetes-operator
5 containers:
6 - name: mongodb-kubernetes-operator
7 image: <operatorVersionUrl>
8 imagePullPolicy: <policyChoice>
9 env:
10 - name: INIT_APPDB_IMAGE_REPOSITORY
11 value: quay.io/mongodb/mongodb-kubernetes-init-appdb

After adding the necessary suffix, your configuration should match the configuration below:

1spec:
2 template:
3 spec:
4 serviceAccountName: mongodb-kubernetes-operator
5 containers:
6 - name: mongodb-kubernetes-operator
7 image: <operatorVersionUrl>
8 imagePullPolicy: <policyChoice>
9 env:
10 - name: INIT_APPDB_IMAGE_REPOSITORY
11 value: quay.io/mongodb/mongodb-kubernetes-init-appdb

After saving the changes, reapply your configuration file.

For users running vanilla Kubernetes:

kubectl apply -f mongodb-kubernetes.yaml

For users running OpenShift:

oc apply -f mongodb-kubernetes-openshift.yaml

Repeat this procedure for the following repository configurations by applying the same -ubi suffix, saving the changes and reapplying the configuration each time to migrate the images separately:

  • AGENT_IMAGE

  • INIT_DATABASE_IMAGE_REPOSITORY

  • INIT_OPS_MANAGER_IMAGE_REPOSITORY

  • MONGODB_ENTERPRISE_DATABASE_IMAGE

  • OPS_MANAGER_IMAGE_REPOSITORY