Docs Menu
Docs Home
/
MongoDB Enterprise Kubernetes Operator
/ /

Migrate MongoDB Enterprise Kubernetes Operator from Ubuntu-based Images to UBI-based Images

To migrate MongoDB Enterprise 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-enterprise-operator
5 containers:
6 - name: mongodb-enterprise-operator
7 image: <operatorVersionUrl>
8 imagePullPolicy: <policyChoice>
9 env:
10 - name: INIT_APPDB_IMAGE_REPOSITORY
11 value: quay.io/mongodb/mongodb-enterprise-init-appdb

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

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

After saving the changes, reapply your configuration file.

For users running vanilla Kubernetes:

kubectl apply -f mongodb-enterprise.yaml

For users running OpenShift:

oc apply -f mongodb-enterprise-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

Back

Upgrade the MongoDB Enterprise Kubernetes Operator