Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Support kube config user exec for EKS #161

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

steinnes
Copy link

@steinnes steinnes commented Jul 31, 2018

What?

This PR adds support for executing client-go credential plugins as defined in the user.exec section of a local kubernetes config. This implementation only supports the retrieval of a bearer token, not the PEM-encoded client certificate and key used with TLS auth. See: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins for more details.

Why?

The "Getting Started" EKS guide on Amazon suggests using the heptio aws authenticator as a client credential plugin. Unless another authentication method is configured, that would leave pykube unable to work with EKS clusters.

@steinnes
Copy link
Author

This is very rudimentary, but should be easy to refactor to support more ways of exec-ing to get k8s auth tokens.

@jheiss
Copy link
Contributor

jheiss commented Aug 1, 2018

It doesn't look like it would take too much more work to make this support the full credential plugin spec for tokens?

@steinnes
Copy link
Author

steinnes commented Aug 1, 2018

Yes, I imagine so, but I didn't look up the spec when I built this. I'm perfectly willing to take a look at the spec and see if I can make this a bit more generic and cleaner. Could you point me in the right direction to find it? :-)

@jheiss
Copy link
Contributor

jheiss commented Aug 1, 2018

😆 https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins

@steinnes
Copy link
Author

steinnes commented Aug 9, 2018

I made this a bit more generic and hopefully easier to extend. I tried not to make too many opinionated changes to the codebase, that means the auth plugin exec code lives in pykube.http at the moment.

@brosner could you take a look and give me some feedback? I'd be happy to reorganize/refactor to fit your overall design for the project :-)

@jakobant
Copy link

jakobant commented Sep 7, 2018

Is there a plan to merge and release this soon?

@steinnes
Copy link
Author

I'm about to move to EKS for our clusters, any feedback which can help get this feature merged? @brosner ? :-)

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

Successfully merging this pull request may close these issues.

3 participants