I am trying to list all the workloads/deployments we're running on the clusters we're running on AKS. I don't see an endpoint for this in AKS API REST reference, how do I get the deployments etc?
2
-
are you talking about k8s API service accessing from inside k8s?– Saikat ChakraborttyCommented May 13, 2021 at 12:21
-
Hi, no I'm simply trying to query the endpoint using Postman. I'm no API person and certainly not a k8s one so all of this is quite alien to me.– Sameer MhaisekarCommented May 13, 2021 at 14:49
Add a comment
|
1 Answer
AKS API is for managing clusters.
See Kubernetes API if you want to access anything within a cluster. E.g. the workloads.
-
Hi, thanks for the reply. Yes that is what I'm trying to do. I'm stuck at the authentication part. I somehow managed to get the authentication to work (I think) but when I make a request to the k8s API I get this error: { "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "pods is forbidden: User \"clusterUser\" cannot list resource \"pods\" in API group \"\" at the cluster scope", "reason": "Forbidden", "details": { "kind": "pods" }, "code": 403 } I think this means the auth worked? Commented May 13, 2021 at 14:33
-
Yes, your auth worked, but your user does not have the necessary permissions. You need to create RBAC permissions for the user you use. kubernetes.io/docs/reference/access-authn-authz/rbac– JonasCommented May 13, 2021 at 14:53
-
Aweesome thanks I'll try that. Seems a little odd to me though considering I was the one deploying the cluster in the first place. Commented May 13, 2021 at 15:45