<p>I have a Kubernetes Cluster on Azure and I need to connect it to an external tool, this tool needs the API server address and the Bearer token, I was able to get the url of the api, but the bearer token, I am not finding.</p>
<p>Does anyone know how to generate this token?</p>

<p>Bearer Tokens are just normal Tokens from ServiceAccounts.</p>
<blockquote>
<p>Service account bearer tokens are perfectly valid to use outside the cluster and can be used to create identities for long standing jobs that wish to talk to the Kubernetes API.</p>
</blockquote>
<p>You should def. create a new ServiceAccount with limit permissions (maybe the Tool has a documentation which permissions are needed).</p>
<p>Generally i would advise to never let any external Tool connect directly to the API Server, but this is up to you.</p>
<p>You can check about ServiceAccount Tokens here: <a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens</a></p>
