Azure / kubelogin

A Kubernetes credential (exec) plugin implementing azure authentication
https://azure.github.io/kubelogin/
MIT License
477 stars 88 forks source link

azure kubelogin doesn't respect KUBECACHEDIR #500

Closed jjournet closed 2 weeks ago

jjournet commented 1 month ago

Hello,

kubectl supports the KUBECACHEDIR environment variable to change the default location of ~/.kube/cache

The kubelogin implementaion from int128 fixed its implementation and respects now the KUBECACHEDIR env var.

Would it be possible to respect the KUBECACHEDIR environment variable in azure kubelogin ?

If a use case helps justify the need: I am using environment module to load different configuration for az cli and kubectl, as we are using different az identities for multiple clusters. With KUBECACHEDIR not being supported, I can only use one az identity at a time for kubectl, as ~/.kube/cache is shared, whereas az and kubectl config are separated.

Thank you JP