28 Apr 2023 07:57 AM - last edited on 08 May 2023 04:34 AM by MaciejNeumann
The Cluster API has an endpoint to create new Tokens, but I need a Token to authorize and use that endpoint, so it's a circular dependency.
I noticed an "afterInstallation" token in the Cluster Management Console (CMC), is there any way I might be able to retrieve that token? My idea was to somehow grab the "afterInstallation" token right after installing dynatrace managed, but I don't know how.
I have ssh access to the nodes in the cluster and the admin username/password. The manual way would be to login to the CMC and go to Settings > API Tokens > Cluster tokens > Generate token.
Is there a way to generate or obtain a token via CLI that doesn't depend on already having a token?
(Question originally posted on: How to get Dynatrace Managed Cluster Token Automatically after installation? - Stack Overflow)
You can use this endpoint to create a new cluster token
For that, you need to generate an API token with ClusterTokenManagement permission, please check the below document.