Upgrading an application using Helm

There are a couple of ways to use an upgrade. Let's perform the following steps: 

  1. Upgrade the release, in our case, my-mysqlrelease, with a newer chart version when available: 
$ helm upgrade my-mysqlrelease stable/mysql
  1. In the future, you may find a specific version of the application that is more stable in your environment or keep the installations identical in multiple clusters. In that case, you can update the chart version with your preferred chart version using the following command:
$ helm upgrade my-mysqlrelease stable/mysql --version 1.2.0
  1. Confirm the chart version change using the following command. After upgrading the version in step 2, you should expect to see mysql --version 1.2.0:
$ helm ls
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
my-mysqlrelease 3 Tue Jul 30 22:44:07 2019 DEPLOYED mysql-1.2.0 5.7.14 default

  1. See the history of revisions using the following command. Since we recently updated the chart version, you should see at least two revisions in the history:
$ helm history my-mysqlrelease stable/mysql
REV UPDATED STATUS CHART DESCRIPTION
1 Oct 1 22:47:37 2019 SUPERSEDED mysql-1.3.3 Install complete
2 Oct 1 22:57:32 2019 SUPERSEDED mysql-1.3.3 Upgrade complete
3 Oct 1 23:00:44 2019 DEPLOYED mysql-1.2.0 Upgrade complete
  1. Use the helm upgrade function to update a parameter on an existing release by specifying a parameter using the --set key=value[,key=value] argument. The following command will set two MySQL password using the --set mysqlRootPassword parameter:
$ helm upgrade my-mysqlrelease stable/mysql --version 1.2.0 --set mysqlRootPassword="MyNevvPa55w0rd"
  1. Confirm that the password is actually updated. You should expect to get the same password you set in step 4:
$ kubectl get secret --namespace default my-mysqlrelease -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo
MyNevvPa55w0rd

Now you have learned how to upgrade a Helm release with new parameters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.60.63