Helm chart - How to Add/Install plugins



Helm is feature rich framework for Kubernetes and it has one more pluggable feature know as Plugins. Helm Charts are build on the principle of pluggable component.

Hence Helm community maintains lots of additional plugin to ease out day to day operations.

You can check list of plugins here - Helm Chart Plugins

In this article we are going to focus on Helm diff plugin.

Table of Content

  1. Lets talk about - Helm Diff Plugin
  2. Lets install the Helm Diff plugin
  3. Lets play with Helm Diff Command
  4. Run Helm Diff command
  5. Uninstall the plugin
  6. Uninstall the plugin any deployment and service inside the Kubernetes cluster



1. Lets talk about - Helm Diff Plugin

There is one plugin which I found very useful in managing the release is Helm Diff Plugin. This plugin helps you with -

  1. Finding the difference between the latest Helm revisions/versions
  2. To know difference between Helm Release


2. Lets install the Helm Diff plugin

Installing the Helm Diff plugin is really simple and it can done with single command -

1helm plugin install https://github.com/databus23/helm-diff

After installation you can verify the plugin using following command -

1helm plugin list

It should return you with the list of plugin which you have installed in the past

1NAME	VERSION	DESCRIPTION                           
2diff	3.1.3  	Preview helm upgrade changes as a diff

Since I have only installed the diff plugin so I am getting only option here.



3. Lets play with Helm Diff Command

To get more understanding on the Helm Diff Plugin first we need to create a HelloWorld Helm Chart and then we need to have at two release of the same helm chart so that we can compare the version difference.


3.1 Create your HelloWorld Helm chart.

Creating a HelloWorld Helm Chart is fairly easy and you just need to run the following helm create helloworld command

1helm create helloworld

3.2 Create Helm Release - myhelloworld

After the creation of the Helm Chart, lets create your first release .i.e. myhelloworld

1helm install myhelloworld helloworld 

3.3 Increase replica count

Alright after creation of your first release - Lets upgrade myhelloworld release.

So for upgrade part we are going to change the replicaCount: in values.yaml

Before proceeding further please do update the replicaCount to 2 inside values.yaml

1replicaCount: 2

3.3 Upgrade the release

Upgrade the release by simply running the following command

1helm upgrade myhelloworld .

Now go and verify the upgrade. It should increase the revision count to 2

1helm list -a      	
1NAME         	NAMESPACE	REVISION	
2myhelloworld 	default  	2       	

So now we have two releases for the myhelloworld and now we can run the Helm Diff.



4. Run Helm Diff command

Here is the command for Helm Diff

1helm diff revision myhelloworld 1 2

Here 1 represents the first release and 2 represents the second release of myhelloworld

After running the helm diff command you will see the values.yaml showing the difference between replicas.

1  spec:
2-   replicas: 1
3+   replicas: 2

Please refer to the following screenshot -

Helm diff plugin



5. Uninstall the plugin

If you do not need plugin then you can uninstall the plugin with its name using the following command

1helm plugin uninstall diff

It should return the following message

1Uninstalled plugin: diff

You can also verify uninstallation by running the helm plugin list command

1helm plugin list

And it should return an empty list

1NAME	VERSION	DESCRIPTION

Conclusion

In this post we have seen -

  1. What are the Helm Plugins
  2. Where to find the Helm Plugins
  3. How to install the Helm Plugins
  4. How to use Helm Plugin diff
  5. Finally how can uninstall the Helm Plugin diff

Read More -

  1. Helm chart - How to Add/Install plugins
  2. Getting started with Helm Chart
  3. Helm chart - WordPress Installation with MariaDB on Kubernetes
  4. Helm chart - Build you first helm chart with Spring Boot
  5. Helm Chart - Convert Kubernetes YAML into Helm Chart YAML
  6. Helm Chart - Pass environment variables
  7. Helm Chart - Plugin
  8. Helm Chart - Dry Run Install
  9. Helm Chart - How to create multiple values files inside helm chart?
  10. Helmfile - How to use Helmfile for managing helm chart?

Posts in this Series