How To Use Previous Versions Of Images Smoothly When Using Helm Charts
By: Tyler Kang
Tags: Bitnami, Helm, Chart, Mongodb, Kubernetes

Usually helm charts are written to allow you to change images with values files. However, when you change the image to previous one, you often suffer from various situations.

I just found out that the MongoDB version of our platform has to use only the 3.2.xx version because of the specific issue of our service. So I tried to install it using stable/mongodb helm chart, but It’s too old to be compatible, so that the mongodb image which is at using stable/mongo chart did not work properly on the latest version of the helm chart.

So, Let me explain how to use the version of MongoDB 3.2.xx in the helm chart. This method is available in all versions of the others helm charts!

I will proceed assuming that Kubernetes cluster and Helm are already prepared. you can easily organize clusters with using many cloud services such as Google GKE, Amazon EKS, and Azure AKS.

Usually to install using the latest version of the MongoDB Helm chart, you can run the following command:

helm install stable/mongodb --values mongo.yaml --name my-mongo

At the beginning, “install” is an installation command, and stable/mongodb represents the chart name.

If it is printed that the chart cannot be found, execute the command below.



https://kubernetes-charts.storage.googleapis.com helm repo add stable \

The “values” option is used to override existing chart options. It is used to customize it to suit the your taste.

The “name” option is used to name it for managing after installed helm chart. For example, when you delete, you can easily delete it using the name or check it on the list.

However, sometimes you might run into annoying problems when using an older version of the image. Check out values of the chart to customize the image version/tag. you can check about the chart below.

To check the tag of the image related a helm chart,usually you can check out hub.docker.com. In case of stable/mongodb, the image of

is used by default.

And, after searching in hub.docker.com, I found out the latest image of 3.2 version mongodb is “3.2.11-r2”, which was updated 3 years ago.

Back to what I said earlier, there is a parameter called “image.tag” and you can modify mongo.yaml value file to use “3.2.11-r2” tag as follows:

Let’s save the mongo.yaml file as shown above and run the install command which mentioned earlier again to ensure that it doesn’t work well.

helm install stable/mongodb --values mongo.yaml --name my-mongo

If you are doing this, you will see that the image is not installed properly. because of the image is too old to be compatible with the chart. This is often the case with other helm charts when using outdated image. However, we can understand this situation without difficulty because it could be very difficult to test all images whenever updating charts.

Let’s take an idea from here and think about whether it would work if we used to the previous version of the chart. Because there was a point when the “3.2.11-r2” version was up to date!

Looking at the image above, it’s been three years since the 3.2 version was updated. Then, in reverse, let’s lower the version of the chart!

The all version of the chart can be found at:

The major version of “0” usaully means beta, so let’s pick the latest “1” and apply it. I chose the 1.0.2 version. it could be working properly if you are using following command.

helm install stable/mongodb --version 1.0.2 \

--values mongo.yaml --name my-mongo

Use this method only if you have to use a specific version, but keep in mind that using older versions can expose you to critical vulnerabilities, and there are a number of bugs.

I hope it helps!