Error: helm install unknown flag: –name
This tutorial provides clarification on how to deal with error helm install unknown flag: –name while trying to install a chart using helm in GKE cluster.
Error: helm install unknown flag: –name
I tried downloading a demo application from git hub as shown below.
$ git clone https://github.com/cloudnativedevops/demo.git Cloning into 'demo'... remote: Enumerating objects: 885, done. remote: Total 885 (delta 0), reused 0 (delta 0), pack-reused 885 Receiving objects: 100% (885/885), 330.78 KiB | 13.78 MiB/s, done. Resolving deltas: 100% (363/363), done.
Then, tried to install the demo application from the following location.
~/demo/hello-helm/k8s/demo (sneppets)$ ls Chart.yaml production-values.yaml staging-values.yaml templates values.yaml
Below is the helm command I ran to install the demo application. But it failed with error: unknown flag: –name as shown below.
$ helm install --name demo /home/sneppets/demo/hello-helm/k8s/demo/ Error: unknown flag: --name
Troubleshoot unknown flag –name error
To check how to use helm install command, you can run the following command. This command will provide information on the usage and flags that you could use.
$ helm install --help
Find out your Helm version.
$ helm version version.BuildInfo{Version:"v3.5.0", GitCommit:"32c22239423b3b4ba6706d450bd044baffdcf9e6", GitTreeState:"clean", GoVersion:"go1.15.6"}
From the Usage guideline it is clear that in Helm version 3.5.0, the release name is not optional and it is mandatory. Therefore you are not allowed to use –-name flag i.e., –name flag is removed.
Usage: helm install [NAME] [CHART] [flags]
Since release name is now mandatory from Helm V3, your helm chart install command should be.
$ helm install demo /home/sneppets/demo/hello-helm/k8s/demo/ NAME: demo LAST DEPLOYED: Mon Apr 5 11:59:30 2021 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None
To auto-generate release names you need to use the following command.
$ helm install --generate-name /home/nithip/demo/hello-helm/k8s/demo/ NAME: demo-1617624202 LAST DEPLOYED: Mon Apr 5 12:03:23 2021 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None $ helm ls NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION demo-1617624202 default 1 2021-04-05 12:03:23.783443044 +0000 UTC deployed demo-1.0.1
After running the helm install command, you could see that Helm would have created a deployment resource which will start a Pod and created a Service.
Note, the helm install command creates deployment resource (Pod) and a Service by creating a Kubernetes object called Helm release.
That’s it. You had learnt how to deal with error unknown flag: –name while trying to install a helm chart.
Hope it helped 🙂
You’ll also like:
- Google cloud shell command to get the default PROJECT_ID – GCP
- Docker EXPOSE Port only to the Host on Google Cloud
- Get Docker Container’s IP Address from the Host
- Copy Files between Host and Docker Container
- What is ImagePullBackOff status on a Kubernetes pod ?
- Set or change root password in Ubuntu Linux
- How to list all Containers running in Kubernetes Pod ?
- Helm 3 – Not a valid chart repository or cannot be reached: failed to fetch : 404 Not Found
- Delete or uninstall specific helm chart resource
- How to remove an image tag from docker hub ?
- Build a Docker Image with a Dockerfile and Cloud Build in GCP?
- How to create GCP project on Google Cloud Platform
- no matches for kind “Deployment” in version “extensions/v1beta1”
- Create GCP project on Google Cloud Platform
- Is it possible to change Google Cloud Platform Project ID ?
- Purpose of –purge flag in helm delete command ?
- Make manual payment or pay early for your Google Cloud Platform charges
- Open specific port such as 8082 in Google Compute Engine
- Delete or unset clusters contexts and users entries from kubectl config