Helm helps you manage Kubernetes applications using helm charts. Helm Charts help you define, install, and upgrade Kubernetes applications.
# add chart repository helm repo add bitnami https://charts.bitnami.com/bitnami # update charts helm repo update # install mysql using helm chart by bitnami helm install bitnami/mysql --generate-name
Helm plugins provide a way to extend Helm features without modifying the helm core codebase.
Helm plugins have the following features:
- They can be added and removed from a Helm installation without impacting the core Helm tool.
- They can be written in any programming language.
- They integrate with Helm, and will show up in helm help and other places.
Helm plugins are stored in
$HELM_PLUGINS directory, you can change this using
helm env command.
A Helm plugin can be installed from a git repo, a tar release or from a local directory.
helm plugin install <path|url>
A helm plugin constists of a plugin.yaml file, which has the plugin definition and its associated commands.
─ fullenv ├── plugin.yaml └── run.sh
plugin.yaml defines the name, usage, description and command to run when invoked.
Commandcan point to your own script of any programming language.
ignoreFlagsswitch tells Helm to not pass flags to the plugin.
So if a plugin is called with
helm myplugin --foo and ignoreFlags: true, then --foo is silently discarded.
name: fullenv usage: "show env vars" description: "show all env vars" command: "$HELM_PLUGIN_DIR/run.sh" ignoreFlags: true
run.sh - just prints helm environment variables.
#!/bin/sh echo $HELM_PLUGIN_NAME echo $HELM_PLUGIN_DIR echo $HELM_PLUGINS echo $HELM_REPOSITORY_CONFIG echo $HELM_REPOSITORY_CACHE echo $HELM_BIN
Helm plugin commands can be configured to target a os platform and architecture.
name: fullenv usage: "show env vars" description: "show all env vars" command: "$HELM_PLUGIN_DIR/run.sh" platformCommand: - os: linux arch: i386 command: "$HELM_PLUGIN_DIR/run.sh" - os: linux arch: amd64 command: "$HELM_PLUGIN_DIR/run.sh"
Helm follows the below rules to choose a command.
platformCommandis present, it will be searched first.
- If both
archmatch the current platform, search will stop and the command will be used.
osmatches and there is no more specific
archmatch, the command will be used.
- If no
platformCommandmatch is found, the default
commandwill be used.
- If no matches are found in
commandis present, Helm will exit with an error.
cd into the plugin directory and then run the command below
# install helm plugin install . # check if the installation is successful helm plugin list
If you like this article, subscribe to the newsletter and Connect with me on twitter to get updates on my future articles. ✅