Helm is a package manager for Kubernetes that simplifies the deployment and management of applications. Below is a Helm cheat sheet covering common commands and operations:
Helm Installation
Install Helm:
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Initialize Helm in the Cluster:
helm init
Chart Operations
Create a New Chart:
helm create mychart
Install a Chart:
helm install myrelease ./mychart
List Installed Releases:
helm list
Upgrade a Release:
helm upgrade myrelease ./mychart
Rollback to a Previous Release:
helm rollback myrelease 1
Uninstall a Release:
helm uninstall myrelease
Chart Configuration
Show Values of a Release:
helm get values myrelease
Show Status of a Release:
helm status myrelease
Dry Run Installation:
helm install --dry-run --debug myrelease ./mychart
Repository Operations
Add Helm Repository:
helm repo add stable https://charts.helm.sh/stable
Update Helm Repositories:
helm repo update
Search Helm Charts:
helm search repo stable/nginx-ingress
Show Information about a Chart:
helm show chart stable/nginx-ingress
Environment Variables
Set Namespace for Helm Commands:
HELM_NAMESPACE=mynamespace helm install myrelease ./mychart
Plugin Operations
Install Helm Plugin:
helm plugin install https://github.com/chartmuseum/helm-push
List Installed Helm Plugins:
helm plugin list
Security
Lint a Chart:
helm lint ./mychart
Check Chart for Vulnerabilities:
helm audit
This cheat sheet provides a quick reference for common Helm commands and operations. Helm has many features and options, so always refer to the official Helm documentation for more detailed information and advanced usage.