-1

I use this command "kubectl top pods" using Kubectl command

I need path api for this command

I need return data from this command "kubectl top pods" via api

1 Answers1

0

The answer is the same for anything that kubectl does: add --v=10 and it'll show you in gory detail what it does

$ kubectl --v=10 -n kube-system get pods
...
curl -v -XGET https://awesome-k8s-api-server:443/apis/metrics.k8s.io/v1beta1/namespaces/kube-system/pods
mdaniel
  • 2,338
  • 1
  • 8
  • 13