tilt icon indicating copy to clipboard operation
tilt copied to clipboard

reload kubeconfig auth tokens

Open nicks opened this issue 4 years ago • 1 comments

Describe the Feature You Want

Some teams rotate auth credentials by writing a new kubeconfig with the new creds. Tilt should have some way to reload those credentials.

Current Behavior

Currently, Tilt loads the kubeconfig at startup, and uses that for the whole session.

Why Do You Want This?

see above

Additional context kubectl has auth plugins that handle token expiration internally. This is how token rotation is typically handled in Kubernetes client libraries

As far as I can tell, most of the libraries Tilt uses don't have an easy way to reload the kubeconfig without throwing away everything and re-initializing from scratch. So this might be technically infeasible to implement.

Related issue: https://github.com/tilt-dev/tilt/issues/2123 (which is for the use case where the cluster itself has been reset)

nicks avatar Apr 29 '21 00:04 nicks

This.

I want to automate some configuration changes to kube config file during tilt up, and I want to avoid writing wrappers that do configuration changes and then runs tilt up.

In my opinion retriggering tilt file should reread the kube config. And since we can do it pretty easy within tilt: local('tilt trigger (Tiltfile)')...

Zuzuske avatar Mar 26 '23 19:03 Zuzuske