Kubernetes API
You can access the Kubernetes API documents from the following locations:
Running Kubernetes API commands
When you run a Kubernetes API command, you must obtain and specify the authentication header. See Preparing to run component or management API commands.
After you obtain that information, you can run Kubernetes API commands. For example, to list the pods in the default namespace, run the following command:
curl -k -H "Authorization:Bearer $ID_TOKEN" https://<Cluster Master Host>:<Kubernetes API Port>/api/v1/namespaces/default/pods
In this command:
$ID_TOKEN
is the variable that stores the authentication token for your cluster<cluster_address>
is defined in Foundational service endpoint
The output resembles the following code:
{ "kind": "PodList",
"apiVersion": "v1", "metadata": { "selfLink": "/api/v1/namespaces
/default/pods", "resourceVersion": "414" }, "items": [{...}, {...}] }