Helm 命令
Helm chart operations
Upgrade or install the named release of the chart in a namespace and use the values from the values.yaml file
# helm upgrade --install <release-name> <chart-path> --namespace <namespace> --create-namespace -f values.yaml
helm upgrade --install ingress-nginx ingress-nginx -n ingress-nginx --create-namespace -f values.yaml
Uninstall the named release of the chart in a namespace
# helm delete <release-name> --namespace <namespace>
helm del ingress-nginx -n ingress-nginx
Render the chart templates locally and output the Kubernetes resources to standard output. Examples:
# helm template <release-name> <chart-path> --values values.yaml --values other-values.yaml --show-only templates/ingress.yaml --set key=value
helm template myapp ./chart -f values.yaml -f values-prod.yaml -s templates/ingress.yaml
Manage the releases of the charts that are deployed on the Kubernetes cluster. Examples:
List the releases that are deployed in the namespace
helm ls -n ingress-nginx
List the releases that are deployed in all namespaces
helm ls -A
Show the status of the named release in a namespace
# helm status <release> -n <namespace>
helm status ingress-nginx -n ingress-nginx
Download the values of the named release
# helm get values <release> -n <namespace> > values.yaml
helm get values ingress-nginx -n ingress-nginx > values.yaml
Helm repo operations
List chart repositories that are configured on the local machine
helm repo ls
Add the ingress-nginx chart repositories
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
Remove the ingress-nginx chart repositories
helm repo rm ingress-nginx
Show the information about the charts that is available in the repositories configured on the local machine. Examples:
List all available charts on the local repositories
helm search repo
Search for stable charts matching the keyword “ingress”
helm search repo ingress
Show the information of the ingress-nginx chart
helm show chart ingress-nginx/ingress-nginx
Show the default values of the ingress-nginx chart
helm show values ingress-nginx/ingress-nginx