REST api alternative for describe command

11/23/2016

How I can call via rest api this commands:

$ kubectl describe po xyz

$ kubectl describe svc xyz

$ kubectl describe node zyx

I need get service endpoints and node capacity usage. But I can't find in docs how I can do this. GET command not provides this information.

-- serhii
google-kubernetes-engine
kubernetes

1 Answer

11/23/2016

Use kubectl --v=8 ... for fun and profit!

For eg: a describe pod is actually a combination of results from the pod and the events APIs:

GET /api/v1/namespaces/default/pods/xyz
GET /api/v1/namespaces/default/events?fieldSelector=involvedObject.name%3Dxyz%2CinvolvedObject.namespace%3Ddefault%2CinvolvedObject.uid%3Dd4605fd6-b152-11e6-a208-02e9103bab42
-- iamnat
Source: StackOverflow