0

I'm having trouble figuring out how I can set my kubectl context to connect to a googlecloud cluster without using the gcloud sdk. (to run in a controlled CI environment)

I created a service account in googlecloud Generated a secret from that (json format)

From there, how do I configure kubectl context to be able to interact with the cluster ?

sleipnir
  • 1
  • 1
  • why don't you show us what you have done till now and where exactly you are stuck – Lalit Mehra Jun 18 '18 at 15:29
  • I'm exactly at the point I described :) I just have a json generated by googlecloud interface, and need to know how to configure kubectl context – sleipnir Jun 18 '18 at 16:11
  • Possible duplicate of [Connect local instance of kubectl to GKE cluster without using gcloud tool?](https://stackoverflow.com/questions/48394610/connect-local-instance-of-kubectl-to-gke-cluster-without-using-gcloud-tool) – Artem Golenyaev Jun 19 '18 at 11:46
  • Indeed, although the accepted answer feels for like a workaround rather than a clean solution. Will be using the official google cloud sdk docker image in the meantime so I can directly consume that json file – sleipnir Jun 21 '18 at 00:03

1 Answers1

0

Right in the Cloud Console you can find the connect link

gcloud container clusters get-credentials "your-cluster-name" --zone "desired-zone" --project "your_project"

But before this you should configure gcloud tool.