0

I know the chart is old, as we are still a bit behind with our Mongodb upgrade. On the high level I would like to know should the upgrade be possible like this even with the newer charts? I'm trying to upgrade my mongodb from 4.x to 5.x.

  1. Download chart:
wget --no-check-certificate https://charts.bitnami.com/bitnami/mongodb-9.3.1.tgz
  1. Install mongodb as replicaset with 3 instances
helm install mongodb mongodb-9.3.1.tgz \
                        --version 9.3.1 \
                        --namespace namespace \
                        --set architecture=replicaset \
  1. Try to upgrade with updated image tag
helm upgrade --debug mongodb mongodb-9.3.1.tgz \
                        --version 9.3.1 \
                        --namespace namespace \
                        --set image.tag=5.0.15-debian-11-r4 \
                        --set architecture=replicaset \
  1. Check with helm list -A, and see the new helm chart is deployed (wrong tag here!):
mongodb   namespace  2   "Today"   +0000 UTC   deployed   mongodb-9.3.1   4.4.1

And: helm status mongodb -n namespace:

LAST DEPLOYED: "Today"
NAMESPACE: flux-prod
STATUS: deployed
REVISION: 2
  1. Check the version in mongo pod, mongodb : db.version() ->4.4.1

  2. Nothing special in the pod logs, or events.

Should I be able to update/upgrade mongodb replica-set like this?

gabopushups
  • 185
  • 2
  • 11
tahaar
  • 1
  • 1

1 Answers1

0

Yes This upgrade was totally possible. The issue I had, was that one replica was not running. And that caused the issue with the update. This was not visible in the logs etc.

tahaar
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 01 '23 at 07:15