How to find json format of kubernetes command

4/15/2019

I know that every command that I enter in Kubernetes communicate with API.

Now I want to speak to API directly. How can I find json format for every command?

-- yasin lachini
kubernetes

2 Answers

4/15/2019

I suggest using a client library if you talk from a programming language:

https://kubernetes.io/docs/reference/#api-client-libraries

Or use kubectl if you talk from CLI. Hardcoding API schemas will add you a maintenance burden. You're basically reimplementing the client in this case.

-- Max Lobur
Source: StackOverflow

4/15/2019

Following is the kubernetes API reference docs, you can find equivalent API for each resources here:

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/

Hope this helps

-- Prafull Ladha
Source: StackOverflow