- Newest
- Most votes
- Most comments
Service account tokens have an expiration of one hour. In earlier Kubernetes versions, the tokens didn't have an expiration. This means that clients that rely on these tokens must refresh the tokens within an hour. The following Kubernetes client SDKs refresh tokens automatically within the required time frame:
-
Go version 0.15.7 and later
-
Python version 12.0.0 and later
-
Java version 9.0.0 and later
-
JavaScript version 0.10.3 and later
-
Ruby master branch
-
Haskell version 0.3.0.0
-
C# version 7.0.5 and later
If your workload is using an earlier client version, then you must update it. [1]
The application is responsible for reloading the token when it rotates. It's often good enough for the application to load the token on a schedule (for example: once every 5 minutes), without tracking the actual expiry time.[2]
What is the EKS version are you running?
[1] https://docs.aws.amazon.com/eks/latest/userguide/service-accounts.html#service-account-tokens
Relevant content
- asked 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- How do I provide cluster access to other IAM users and roles after I create a cluster in Amazon EKS?AWS OFFICIALUpdated 6 months ago
Hello @bijay_k, thanks for the reply
My EKS cluster version is 1.25 My pods have been redeployed 26hours ago and queries still seems to work, so I'm not sure if the problem was related due to something else. I'll keep this topic updated with more information if the problem arise again.
I'm not sure I follow, you are suggesting all container applications requires to reference the Kubernetes client SDKs and refresh the token manually inside a worker thread, and the AWS SDK doesn't do it on its own? This would be extremely tedious and it wouldn't work with most public docker applications if it requires custom code. To clarify, the application doesn't interact with the cluster, it only uses services via the AWS SDK, which I would expect to automatically refresh its connection information via the refreshed token sent via the projected volume.