How to handle Helm’s common errors: “Error: must either provide a name or specify — generate-name” and “Error: Kubernetes cluster unreachable: the server has asked for the client to provide credentials”
You just start with Helm Chart creation, and you are surprised to find the following error when you run a simple “helm install” command:
“install.go:172: [debug] Original chart version: “”
Error: must either provide a name or specify — generate-name
helm.go:94: [debug] must either provide a name or specify — generate-name
Previously, when you ran “helm install” command in Helm 2.x, the command worked without providing a default name. But as of Helm 3.x, you just need to provide a sample name or add “ — generate-name” (that is generate-name with 2 hypen/dash appended) option. So, for a dry-run, your modified command will be like:
where PATH_YOUR_HELM_DIRECTORY is where you created your Helm directory and TEST_NAME is the sample name you want to call your Helm
However, you might encounter a different problem this time.
Error: Kubernetes cluster unreachable: the server has asked for the client to provide credentials
helm.go:94: [debug] the server has asked for the client to provide credentials
Kubernetes cluster unreachable
So, even if you run a dry run for Helm install, you need to be logged into a Kubernetes cluster. Please follow the Youtube link below to learn how you can install Minikube, Kind, CRC, or Minishift.
Once after you launch one of the Kubernetes application then you run the command again, you should see it is working as expected.