Helm upgrade get currently deployed chart version

10/28/2019

When running helm upgrade..., I'd like to be able to detect the currently deployed Chart version so I can set specific template values based on it.

Something like {{ Release.ChartVersion }} or {{ Chart.InstalledVersion }}.

I'm familiar with the official guide, but was not able to find a way to do this.

-- Eldad Assis
kubernetes-helm

1 Answer

10/28/2019

Unfortunately running helm upgrade not check the currently installed version, just run an upgrade. But you can check installed version by running: helm ls. You'll see the table of installed packages in the cluster. You can find and check the chart version:

MY_PACKAGE_VERSION=$(helm ls | grep 'my-best-chart-name' | awk '{ print $10 }')
-- ozlevka
Source: StackOverflow