How to authenticate to a Kubernetes cluster created on AWS w/ kops

21 views
Skip to first unread message

bg

unread,
Dec 5, 2017, 2:11:58 PM12/5/17
to Kubernetes user discussion and Q&A
I have several Kubernetes cluster on GKE, and recently created a cluster on AWS. When working against a GKE cluster, I run this command:

gcloud container clusters get-credentials my-cluser --zone us-central1-a --my project

I'd like to know how I should be authenticating with a kubernetes cluster on AWS provided I created the cluster with kops.

I notice that the cluster and the context were added to my ~/.kube/config file, presumably in the `kops create cluster` or the `kops update cluster` commands.

More specifically, I ask this because I have a CI server that is responsible for authenticating against a cluster and new deploying new version of deployments, so I need to find a way to make this very automated.

Thanks in advance!

Rodrigo Campos

unread,
Dec 6, 2017, 10:30:33 AM12/6/17
to kubernet...@googlegroups.com
There is a similar command for kops, see: https://github.com/kubernetes/kops/blob/master/docs/cli/kops_export_kubecfg.md

That should do the trick.
--
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 kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

bg

unread,
Dec 6, 2017, 2:40:32 PM12/6/17
to Kubernetes user discussion and Q&A
Worked like a charm. Thank you very much!

Rodrigo Campos

unread,
Dec 6, 2017, 6:37:07 PM12/6/17
to kubernet...@googlegroups.com
Awesome :)


On Wednesday, December 6, 2017, bg <griff...@gmail.com> wrote:
Worked like a charm. Thank you very much!

Reply all
Reply to author
Forward
0 new messages