Helm is a great tool to manage deployments in K8s. The command line is very simple and intuitive, but you can't remember all of the commands. Here's my personal list that I use for my Helm deployments:
Repositories
- helm repo list - List chart repositories that are configured
- helm repo add [NAME] [URL]- Add a chart repository by name and URL. Example:
helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo update - Update information on available charts in the repositories
- helm repo remove [REPO] - Removes a Helm repository from your local environment. Example:
helm repo remove bitnami
Charts
- helm show values [CHART] - Show the default values for a chart. Example:
helm show values bitnami/nginx
- helm search hub
- helm search repo [CHART TO SEARCH] - Search for charts in the Helm repositories. Example:
helm search repo nginx
- helm pull [chart URL | repo/chartname] - Downloads a chart from a repository and optionally unpacks it locally. Example:
helm pull bitnami/nginx --untar
- helm template [CHART] - Render the templates in a chart locally, displaying the output. Example:
helm template my-release bitnami/nginx
Releases
- helm install [RELEASE_NAME] [CHART] - Install a chart to create a new release. Example:
helm install my-release bitnami/nginx
- helm install --dry-run - Simulates an install, showing what would be installed without actually deploying anything. Example:
helm install my-release bitnami/nginx --dry-run
- helm list [-n namespace] - Displays all releases deployed or failed in a namespace
- helm upgrade [RELEASE_NAME] [CHART] - Upgrade a release to a newer version of a chart.
helm upgrade my-release bitnami/nginx -f custom-values.yaml
- helm uninstall [RELEASE_NAME] [-n namespace] - Uninstall a release installed in a namespace
- helm rollback [RELEASE_NAME] [REVISION NUMBER TO GET BACK] - Rolls back a release to a previous version.
helm rollback my-release 1
- helm status [RELEASE_NAME] -n [NAMESPACE] —show-resources - show the status of a deployed release with the detail of the resources created
- helm get manifest [RELEASE_NAME] - Display the Kubernetes manifests of a release
- helm get values [RELEASE_NAME] - Get the values of a release
- helm history [RELEASE_NAME] - Shows the history of revisions for a particular release. Example:
helm history my-release