Upgrading and rolling back a release

You may want to upgrade a package you installed to the latest and greatest version. Helm provides the upgrade command, which operates intelligently and only updates things that have changed. For example, let's check the current values of our mariadb installation:

> helm get values cranky-whippet
mariadbDatabase: awesome_stuff
mariadbRootPassword: evenbettersecret 

Now, let's run, upgrade, and change the name of the database:

> helm upgrade cranky-whippet --set mariadbDatabase=awesome_sauce stable/mariadb
$ helm get values cranky-whippet
mariadbDatabase: awesome_sauce 

Note that we've lost our root password. All the existing values are replaced when you upgrade. OK, let's roll back. The helm history command shows us all the available revisions we can roll back to:

> helm history cranky-whippet
REVISION         STATUS           CHART            DESCRIPTION
1               SUPERSEDED      mariadb-2.1.3      Install complete
2               SUPERSEDED      mariadb-2.1.3      Upgrade complete
3               SUPERSEDED      mariadb-2.1.3      Upgrade complete
4               DEPLOYED        mariadb-2.1.3      Upgrade complete  

Let's roll back to revision 3:

> helm rollback cranky-whippet 3
Rollback was a success! Happy Helming!
    
> helm history cranky-whippet
REVISION        STATUS             CHART            DESCRIPTION
1                SUPERSEDED      mariadb-2.1.3     Install complete
2                SUPERSEDED      mariadb-2.1.3     Upgrade complete
3                SUPERSEDED      mariadb-2.1.3     Upgrade complete
4                SUPERSEDED      mariadb-2.1.3     Upgrade complete 
5                DEPLOYED        mariadb-2.1.3     Rollback to 3   

Let's verify that our changes were rolled back:

> helm get values cranky-whippet
mariadbDatabase: awesome_stuff
mariadbRootPassword: evenbettersecret  
..................Content has been hidden....................

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