I have a docker image that installs kubectl and scripts that will run various 
kubectl commands.

When I run it locally, everything works great. But when I deploy it on another 
machine I get authentication errors.

I'd like to better understand how I have have a service like this authenticate 
with GCP (but ideally it could authenticate with a Kubernetes cluster 
regardless of what platform it is running on).

I have the cluster ca cert, username, and password.

Locally, the code works because I ran this command:

gcloud container clusters get-credentials <cluster-name> --zone <cluster-zone> 
--project <project-id>

And before that, I did this:

gcloud auth login
gcloud auth activate-service-account

So, my next thought is perhaps I need to install gcloud on this same Docker 
image. However, I don't know what google account to authenticate with, or how 
(requires opening browser and logging in).

Lastly, I'd like this service to be able to authenticate with multiple clusters 
(so different projects and zones). I have all the metadata for each cluster, I 
just don't understand how to authenticate kubectl with each cluster.

Thanks for any help!

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
  • [kubernetes-... bg
    • Re: [ku... 'Ahmet Alp Balkan' via Kubernetes user discussion and Q&A

Reply via email to