How to create kubectl user token with .NET SDK
An app is using OCI .NET SDK, API key for authentication and OKE to manage Kubernetes clusters. I would like to generate a user token using the SDK so that the app could connect to the Kubernetes cluster and perform operation like listing pods.
When working with CLI, I can run oci ce cluster create-kubeconfig
, it updates the config file of kubectl with a user for which an exec
is defined to run the CLI with generate-token
I see that the SDK does not provide generate-token
.
What other options or workarounds are available?
I assume that I can construct the token string myself, but I am not sure how to sign it using the SDK correctly.
Tagged:
0