How to manage Kubernetes packages with Helm?
A deeper dive into Helm install, upgrade, and uninstall.
I have written about the basics of Helm before and how it can make complicated deployment easy. This post is a bit of a deeper dive into the Helm. How to work with the install command? How upgrading and removing applications works? And a gotcha associated with uninstalling
Install / Upgrade
I covered installation in the post linked above. In this section, I am exploring some additional options that have proven useful as I have worked more with Helm.
helm install --atomic nextcloud nextcloud/nextcloud
Atomic is a super useful option when I want to test out new configuration for any deployment. The
--atomic option keeps the deployment if it is successful and deletes the deployment on failure. For me this helps keep the cluster clean of failed deployments and there are less steps to clean up the deployment yourself.
This option automatically sets the
--wait option. This option tells the helm CLI to wait until all resources are up and running to declare the deployment a success. This option also implies the
--timeout flag which uses the default value of five minutes.
helm install --dry-run nextcloud nextcloud/nextcloud
This option does extactly what it says. Its a dry run of the installation or update command. This is also super useful to check how the installation or update will go.
If you like content on this blog you can support us by using the DO referral link to sign up and get free credit. And you'll support us as well.
Referral link: https://m.do.co/c/590c0c82c1fc
Also you can subscribe directly signing up for free, or support us with a small monthly or yearly fee. Simply click the button at the bottom right corner.
helm uninstall --keep-history nextcloud
The keep history option is useful when I want to temporarily uninstall a chart. With this option reverting remains easy with helm even if you uninstall an application. The history allows you revert to a previous working version even after you reinstall the application.
One thing i noticed about Bitnami charts specifically is that the volume claims for stateful sets are not uninstalled with the chart. This is a good thing in general because a stateful set is usually a database and you don't want to lose that data. But in case you do want to uninstall an application completely, make sure to check the PVCs if you have a database running on your cluster.
I will making this content like this and more so please consider supporting me by subscribing.
Sign up by using the button at the bottom right corner. Also conider supporting with a small monthly fee.
Happy Hacking :)