common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1.04k stars 93 forks source link

The EKS recipe auth is slow, add alternative approach to docs #441

Open mkotsalainen opened 1 year ago

mkotsalainen commented 1 year ago

Hi! I just tried granted and it looks awesome except one thing: the recommended way slows down my kubectl / k9s operations.

I followed the recipe here: https://docs.commonfate.io/granted/recipes/eks

This caused me to almost give up on granted but I realised that I could export my credentials via -ex. I think the docs should mention this approach also. This has the added benefit of not having to modify your ~/.kube/config file which is kind of a PITA if you're working with lots of clusters.

Congratulations - I'm very impressed with what you've created and will be following the project 👏

greg-swift-yohana commented 1 year ago

Could you expand on how you used the --ex approach ?

mkotsalainen commented 1 year ago

@greg-swift-yohana I use this bash function:

switch_account () {
    source assume $1 -ex --duration 12h
    kubectl config use-context $1
}

This sets credentials for the current terminal session.