-
Notifications
You must be signed in to change notification settings - Fork 997
Equivalent to aws eks get-token #6440
Copy link
Copy link
Open
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.service-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.service:eks
Metadata
Metadata
Assignees
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.service-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.service:eks
Describe the feature
It would be nice if there was a AWS Java SDK equivalent of AWS CLI's
aws eks get-token, which I could call to generate a (time-limited) Kubernetes API token for my Java process' current AWS identity similar to:{ "kind": "ExecCredential", "apiVersion": "client.authentication.k8s.io/v1beta1", "spec": {}, "status": { "expirationTimestamp": "1970-01-01T00:00:00Z", "token": "k8s-aws-v1.[REDACTED]" } }Use Case
Authenticate to an AWS EKS cluster via its regular Kubernetes HTTP API, without having to create a permanent Kubernetes API token and pass it to the Java process that's already authenticated to AWS.
Proposed Solution
An officially sanctioned version of e.g. https://github.com/MrBergin/EksX or https://stackoverflow.com/questions/59853623/get-authentication-token-from-aws-eks-using-the-aws-java-sdk-v2.
Other Information
References: aws/aws-sdk-java#2737
References: aws/aws-sdk-java#1795
References: https://stackoverflow.com/questions/59853623/get-authentication-token-from-aws-eks-using-the-aws-java-sdk-v2
References: https://github.com/MrBergin/EksX
Acknowledgements
AWS Java SDK version used
2.33.2
JDK version used
docker.io/library/eclipse-temurin:17.0.16_8-jre
Operating System and version
Linux 6.16