aca/go-kubectx

kubectx times out

anoldguy opened this issue · 1 comments

When switching to a context for an Amazon EKS cluster that requires mfa authorization, I get the following:

Switched to context "hse"
Enter MFA code for arn:aws:iam::<snip>:mfa/<snip>: W0127 10:56:26.501431    3634 transport.go:243] Unable to cancel request for *exec.roundTripper
<paste token here>

Err: Get https://<snip-hostname>.eks.amazonaws.com/api/v1/namespaces: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

When I re-run the command, it works, as the mfa token has been set correctly.

I would expect the client to wait until the mfa token was entered before attempting any further communication. However, I'm not sure how much you can change here, as it might be upstream in the aws client.

aca commented

@anoldguy Hi, I'm really sorry but I have no experience with EKS and mfa authroization.
Leave this issue opened. I will try to fix it when I find out what's going on.

I've checked original kubectx but I don't see code that handles any authroization logics. Does it work with original kubectx?