Kubenetes gcloud container engine get-credential error

226 views
Skip to first unread message

Anchit Pancholi via StackOverflow

unread,
Oct 8, 2016, 3:55:07 AM10/8/16
to google-appengin...@googlegroups.com

I am trying to connect Google Container Engine from my local machine using gcloud sdk but i am getting below error.

C:\Program Files (x86)\Google\Cloud SDK>gcloud container clusters get-credential
s cluster-2  --zone us-central1-a --project myapp-00000
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) environment variable HOME or
KUBECONFIG must be set to store credentials for kubectl

I have check at HOME location there is not .kube folder created and not environment variable set by default, so i have created KUBECONFIG environment by myself after that i am getting below error :-

ERROR: gcloud crashed (OSError): [Errno 13] Permission denied: 'C:\\Tool\\config'

i have started gcloud sdk as admin and it have all the correct Permission.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/39930036/kubenetes-gcloud-container-engine-get-credential-error

Anchit Pancholi via StackOverflow

unread,
Oct 8, 2016, 4:05:06 AM10/8/16
to google-appengin...@googlegroups.com

I am trying to connect Google Container Engine from my local machine using gcloud sdk but i am getting below error.

C:\Program Files (x86)\Google\Cloud SDK>gcloud container clusters get-credential
s cluster-2  --zone us-central1-a --project myapp-00000
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) environment variable HOME or
KUBECONFIG must be set to store credentials for kubectl

I have check at HOME location there is not .kube folder created and not environment variable set by default, so i have created KUBECONFIG environment by myself after that i am getting below error :-

ERROR: gcloud crashed (OSError): [Errno 13] Permission denied: 'C:\\Tool\\config'

i have started gcloud sdk as admin and it have all the correct Permission.

EDIT

I am using below version (which are latest as of today)

Google Cloud SDK 129.0.0
kubectl
kubectl-windows-x86_64 1.4.0
C:\Program Files (x86)\Google\Cloud SDK>kubectl version
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0",
Error loading config file "C:\Tool\config": read C:\Tool\config: The handle is invalid.

kubectl version giving some error, not sure how to resolve it.

Anchit Pancholi via StackOverflow

unread,
Oct 8, 2016, 4:30:04 AM10/8/16
to google-appengin...@googlegroups.com

I am trying to connect Google Container Engine from my local machine using gcloud sdk but i am getting below error.

C:\Program Files (x86)\Google\Cloud SDK>gcloud container clusters get-credential
s cluster-2  --zone us-central1-a --project myapp-00000
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) environment variable HOME or
KUBECONFIG must be set to store credentials for kubectl

I have check at HOME location there is not .kube folder created and not environment variable set by default, so i have created KUBECONFIG environment by myself after that i am getting below error :-

ERROR: gcloud crashed (OSError): [Errno 13] Permission denied: 'C:\\Tool\\config'

i have started gcloud sdk as admin and it have all the correct Permission.

EDIT

I am using below version (which are latest as of today)

Google Cloud SDK 129.0.0
kubectl
kubectl-windows-x86_64 1.4.0
C:\Program Files (x86)\Google\Cloud SDK>kubectl version
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0",


jeffml via StackOverflow

unread,
Oct 10, 2016, 1:55:04 PM10/10/16
to google-appengin...@googlegroups.com

I take it you set KUBECONFIG env to 'C:\Tool\config'? That error is gcloud failing to write due to missing admin privileges; I don't know if you need to run the shell as admin. You might also try the HOME directory. Note that gcloud will attempt to create any missing directories on the path to the kubeconfig file.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/39930036/kubenetes-gcloud-container-engine-get-credential-error/39963942#39963942
Reply all
Reply to author
Forward
0 new messages