Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh service account token periodically #207

Closed
kafonek opened this issue May 23, 2022 · 2 comments
Closed

Refresh service account token periodically #207

kafonek opened this issue May 23, 2022 · 2 comments

Comments

@kafonek
Copy link

kafonek commented May 23, 2022

Thank you for working on this project, I appreciate using kubernetes_asyncio.py.

When using Python to talk to the Kubernetes API from within a Pod/container, kubernetes.py will periodically refresh/reload the service account token it is using, per kubernetes-client/python#741 (closed by kubernetes-client/python-base#250). Their original use case was for short-lived IAM credentials, but the issue is in focus again with warnings coming up in the Amazon EKS 1.21 and 1.22 release notes (https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html).

kubernetes_asyncio.py has some support for refreshing tokens but I believe it's only relevant to GCP tokens, not k8s service account tokens (#26).

I have to admit I don't understand the nuances of how code is generated or customized in either project but I believe the main difference is in config/kube_config.py KubeConfigLoader._set_config

@tomplus
Copy link
Owner

tomplus commented May 23, 2022

Thanks for kind words :)

I know that one of the contributor is working on it here #205 I'm sure that it will be resolved soon.

@tomplus
Copy link
Owner

tomplus commented May 24, 2022

It's released in v22.6.5.

@tomplus tomplus closed this as completed May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants