-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

Hemanth Kumar
  • 314
  • 2
  • 7

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,561
  • 1
  • 9
  • 13