Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support AWS Authenticator for EKS #306

Closed
spiffytech opened this issue Aug 2, 2018 · 3 comments
Closed

Please support AWS Authenticator for EKS #306

spiffytech opened this issue Aug 2, 2018 · 3 comments

Comments

@spiffytech
Copy link

Amazon EKS requires the user generates a token through the AWS Authenticator, using the exec option on the user property in the kubeconfig file. kubernetes-client does not appear to support this option, so we cannot use it to talk to our EKS clusters.

https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html

@silasbw
Copy link
Contributor

silasbw commented Aug 2, 2018

We need to support this. We're also planning on adopting EKS.

@cfellin1
Copy link
Contributor

On it.

@faizhasim
Copy link

This is my workaround for my development setup. The idea is to create (or reuse) a ServiceAccount and use the ServiceAccount token to authenticate. So, instead of doing this:

  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - myclustername
      command: heptio-authenticator-aws

I would, configure directly with the ServiceAccount token:

user:
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In my development cluster, I have access to Tiller serviceaccount, so I just get the serviceaccount token secret and configure a new KUBECONFIG. I modified my code a bit to help development:

const kubeConfig = () => {
  if (isInCluster()) {
    return config.getInCluster()
  } else if (process.env.KUBECONFIG) {
    return config.fromKubeconfig(config.loadKubeconfig(process.env.KUBECONFIG))
  } else {
    return config.fromKubeconfig()
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants