how to get authentication token for AKS cluster

Senior Member

I want to access AKS cluster information (like top nodes, top pods, cpu and m/y utilization) from an azure function app. I am getting "unauthorized"/ "bad request" when I access the server(for eg:

https://<server-name>/api/v1/namespaces/default/pods, this gives unauthorized). My understanding is, I have to pass credentials to this url and get authentication token and post that token to AKS cluster will help me get the pods details. Pls help me on how to do this or share if you have any documentation. TIA

0 Replies