April 2018
Intermediate to advanced
468 pages
14h 34m
English
The output from the API can be too verbose sometimes. Often, you're interested just in one value out of a huge chunk of JSON responses. For example, if you want to get the names of all running services, you can hit the /api/v1/services endpoint. The response, however, includes a lot of additional information that is irrelevant. Here is a very partial subset of the output:
$ http http://localhost:8080/api/v1/services{ "apiVersion": "v1", "items": [ { "metadata": { "creationTimestamp": "2018-03-03T05:18:30Z", "labels": { "component": "apiserver", "provider": "kubernetes" }, "name": "kubernetes", … }, "spec": { … }, "status": { "loadBalancer": {} } }, … ], "kind": "ServiceList", "metadata": { "resourceVersion": ...Read now
Unlock full access