kubernetes: Broken test runs: gcloud crashing

gcloud is crashing due to ERROR: gcloud crashed (error): [Errno 111] Connection refused

see https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10711/ for an example.

https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce/19753/ seems to have some backtraces. This may indicate that it has something to do with the metadata server.

At least one of the failures in: #28336 #28083 #28013 #27839 #27767

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Gentlemen, Here is more information from Google rep, read ALL of it, because the first interaction didn’t resolve it as I had no idea where my “keyfile.json” file was.

Your ~/.kube/config is missing some value for authentication. To resolve this, run the command below on your gcloud shell (Google Console):

$ export GOOGLE_APPLICATION_CREDENTIALS="/path/to/keyfile.json"

Next, you’ll need to run the get-credentials command below again to fetch credentials for a running cluster.

$ gcloud container clusters get-credentials project-cluster-1 --zone us-central1-c

Then, you may now run ‘kubectl proxy’ command again and let me know if you’re still having trouble.

I asked where the keyfile.json file was…

The keyfile.json is a service account key that can be manually generated under IAM & Admin --> Service accounts. Currently, you have not created such key.

However, there’s still an alternative and easier way to that. Run the command below on your Google Console.

$ gcloud config set container/use_client_certificate True

Then, rerun:

$ gcloud container clusters get-credentials project-cluster-1 --zone us-central1-c

Let me know if you’ll get expected results as you run kubectl proxy again.

So this time when I ran that I no longer got an error… BUT…

Now when I run kubectl proxy it returns:

Starting to serve on 127.0.0.1:8001

But when I use a browser to access that it returns:

<h3>Unauthorized</h3>

Incidentally, I also tried the first method, generating the key and pointing at it to no effect.

If I get it resolved will try to remember to post resolution here.