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.

URL for Creating a Cluster

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

Where <zone> is the availability zone in which the cluster will be created.

An example of a common query 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>"

URL for Working with the Created Cluster

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

Where 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 query 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>"