If I upgrade the chart, then the newer one overrides the older one and it is same as installing the newer chart
Is upgrade same as uninstalling a older release and installing a updated chart with the same release name ?
If it is same, then what is the use of upgrade ?
Hi @dnpuneeth3,
The install
command used to install a chart, you must supply the helm chart reference to install it.
The example of installing mysql:
$ helm repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/mysql
On the other hand, helm upgrade
modifies the existing release of a specific chart.
helm upgrade my-release my-repo/mysql
So install create an instance (release) of a chart, while upgrade update/modify the existing instance (release) of a specific chart.
Hope it clear.
Happy learning,
Trung.
when chart is upgraded, will it uninstall the older instance k8s objects and install new k8s object ?
Hi @dnpuneeth3,
It will update the k8s objects like deployment
or statefulset
to the required version (new image), so it will delete the old version pod and create a new one.
You can try to install
a mysql chart at version 9.3.5, then upgrade to the latest version and see the event (kubectl describe statefulset
) in the MySQL stateful set, you will see it deletes the old pod and create a new one with a new version.
More can be found here: Helm | Helm Upgrade
Happy learning,
Trung.
Does it update only specific objects such as deployment or statefulset or all the objects? what are the objects that does not update ?
Hello @dnpuneeth3,
It depends on the helm chart, can you give me the chart that you’re using so we can discuss the same thing?
Happy learning,
Trung.