- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Is your task related to a problem? Please describe
I am trying to create new expiring token for existing ServiceAccount, basically equivalent of
kubect create serviceaccount my-service-account -n xxx kubectl create token my-service-account -n xxx --duration=1h I see there is TokenRequestBuilder and TokenRequest but the latter do not extend HasMetadata thus I cannot use generic API for creation.
Is there any way to call this api?
Describe the solution you'd like
Having an API for easy token creation.
See something similar in go sdk
https://github.com/kubernetes/client-go/blob/686b396dc0681d7f140bd2ee6b3c3bdea56cab4d/kubernetes/typed/core/v1/serviceaccount.go#L214
Describe alternatives you've considered
No response
Additional context
No response