Monday, May 29, 2017

Fixing "ERROR: (gcloud.container.clusters.get-credentials) environment variable HOME or KUBECONFIG must be set to store credentials for kubectl"

Yesterday, I was studying Kubernetes and got an issue while installing the gcloud commands in my local windows.

The error message was "ERROR: (gcloud.container.clusters.get-credentials) environment variable HOME or KUBECONFIG must be set to store credentials for kubectl"

After research in the internet I found the solution, I will describe how to fix the issue.


Set environment variable:

image
then execute the following in the (under current user) command line:
mkdir .kube
cd .kube
echo "" > config
because you make the config file under current user gcloud should have the right permissions:
image

Source: https://github.com/kubernetes/kubernetes/issues/34395

No comments:

Post a Comment