Kubernetes API

The Kubernetes API is a programming interface that provides access to cluster and node management in the Managed Kubernetes product. Using the API, you can create clusters and automate their maintenance.

Authorization

OpenStack Keystone tokens are used to work with the Kubernetes API. The tokens are passed in the X-Auth-Token header. Learn more about authorization.

To create a cluster, use the following address (URL): https://<zone>.mks.selcloud.ru/v1/

zoneavailability zone in which the cluster will be created.

An example of a common request that can be used to create a new cluster:

curl 'https://ru-1.mks.selcloud.ru/v1/clusters' -X POST -d '{"cluster":{"name":"name", "region":"ru-1"}}' -H "X-Auth-Token: <token>"

To work with the created cluster, use the following address (URL): KUBE_API

KUBE_API is the IP address for managing the cluster. It is located in the Kube API field on the Settings tab of the cluster page in the Control panel.

An example of a request that can be used to get information about a created cluster:

curl 'MKS_API_IP/v1/clusters/<CLUSTER_UUID>' -X GET -H "X-Auth-Token: <token>"