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
- Lets talk about - Helm Diff Plugin
- Lets install the Helm Diff plugin
- Lets play with Helm Diff Command
- Run Helm Diff command
- Uninstall the plugin
- 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 -
- Finding the difference between the latest Helm revisions/versions
- 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 -
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 -
- What are the Helm Plugins
- Where to find the Helm Plugins
- How to install the Helm Plugins
- How to use Helm Plugin
diff
- Finally how can uninstall the Helm Plugin
diff
Read More -
- Helm chart - How to Add/Install plugins
- Getting started with Helm Chart
- Helm chart - WordPress Installation with MariaDB on Kubernetes
- Helm chart - Build you first helm chart with Spring Boot
- Helm Chart - Convert Kubernetes YAML into Helm Chart YAML
- Helm Chart - Pass environment variables
- Helm Chart - Plugin
- Helm Chart - Dry Run Install
- Helm Chart - How to create multiple values files inside helm chart?
- Helmfile - How to use Helmfile for managing helm chart?
Posts in this Series
- How to use Helmfile for managing helm chart?
- How to create multiple values files inside helm chart?
- Pass environment variables into Helm Chart?
- How to fix - Helm install unknown flag --name/Error must either provide a name or specify --generate-name?
- Understanding Helm dry run for template debugging
- How to fix - Error create failed to create Secret invalid metadata.name Invalid value DNS-1123 subdomain must consist of lower case alphanumeric characters - or ., and must start and end with an alphanumeric character (e.g. example.com, regex used for validation is)
- Convert Kubernetes deployment YAML into Helm Chart YAML
- Helm chart - Wordpress Installation with MariaDB on Kubernetes
- Helm chart - How to Add/Install plugins
- Getting Started with Helm Chart
- Building first Helm Chart with Spring Boot Microservices