databricks / click

The "Command Line Interactive Controller for Kubernetes"
Apache License 2.0
1.49k stars 84 forks source link

aws-iam-authenticator support added #78

Closed ahmetrehaseker closed 3 years ago

ahmetrehaseker commented 5 years ago

I want to use click via Amazon EKS therefore i implement authentication method for eks.

mustafaakin commented 5 years ago

We need it a lot

nicklan commented 5 years ago

Thanks for this! Will have a look over in the near future.

nicklan commented 5 years ago

Okay, I've had a look over this and want to get this support in. A couple of concerns i have:

Lemme know what you think. I can probably have a chance to make the above changes in the nearish future too, based on what you have here, or you can :)

maver1ck commented 5 years ago

Hi, Any progress on this task ?

ahmetrehaseker commented 5 years ago

I have very little knowledge in rust, I want to do it but it will take time. any help would be great :)

Keramblock commented 5 years ago

Hi, is there any progress?

slyoldfox commented 5 years ago

I have also no knowledge in rust but as @nicklan said - the current code "read" okay to me. The only issue being that it should cache the token. Which makes me actually start to wonder where it stores the token when I use it through kubectl?

Anyway if you really want to use click in the meantime, you can use the following workaround:

Create a new context in your config file, append -token to the name and do the same for the user. After you authenticated with aws-adfs, fetch your token from command line with: $ aws-iam-authenticator token -i eks-clustername

You can also use $ aws eks get-token --cluster-name eks-clustername if you have a recent awscli version.

Copy paste the token inside your user yaml part like this: `

kirikaza commented 5 years ago

@ahmetrehaseker you can minimise conflicts if you avoid mixing meaningful changes (like new feature or a bug fix) and cosmetic changes (like reformatting).

nicklan commented 4 years ago

I believe this is provided now by what I merged in #129. If anyone who is interested in EKS auth could try that out, that would be great. I tested by adding the cluster to my config via aws eks update-kubeconfig --name cluster-name and then just running click and it worked.

nicklan commented 3 years ago

closing as this functionality exists and works (afaict)