15.5. Listing Kubernetes clusters

GET /v1/clusters

List all Kubernetes clusters.

Source: https://docs.openstack.org/api-ref/container-infrastructure-management/#list-all-clusters

15.5.1. Request

Name In Type Description
cluster_ident path string The UUID or name of clusters in Magnum.

15.5.1.1. Example

# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAAB<...>' \
https://<node_IP_addr>:9513/v1/clusters

15.5.2. Response

Name In Type Description
X-Openstack-Request-Id header UUID A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs.
clusters body array The list of all clusters in Magnum.
status body string The current state of the bay/cluster.
uuid body UUID The UUID of the cluster.
links body array Links to the resources in question.
stack_id body UUID The reference UUID of orchestration stack from Heat orchestration service.
keypair body string The name of the SSH keypair to configure in the bay/cluster servers for ssh access. Users will need the key to be able to ssh to the servers in the bay/cluster. The login name is specific to the bay/cluster driver, for example with fedora-atomic image, default login name is fedora.
master_count body integer The number of servers that will serve as master for the bay/cluster. The default is 1. Set to more than 1 master to enable High Availability. If the option master-lb-enabled is specified in the baymodel/cluster template, the master servers will be placed in a load balancer pool.
cluster_template_id body UUID The UUID of the cluster template.
node_count body integer The number of servers that will serve as node in the bay/cluster. The default is 1.
create_timeout body integer The timeout for cluster creation in minutes. The value expected is a positive integer and the default is 60 minutes. If the timeout is reached during cluster creation process, the operation will be aborted and the cluster status will be set to CREATE_FAILED.
name body string Name of the resource.

15.5.2.1. Status codes

15.5.2.1.1. Success

Code Reason
200 - OK Request was successful.

15.5.2.1.2. Error

Code Reason
401 - Unauthorized User must authenticate before making a request.
403 - Forbidden Policy does not allow current user to do this operation.

15.5.2.2. Example

{
  "clusters": [
    {
      "status": "CREATE_COMPLETE",
      "cluster_template_id": "4aceb259-3799-4a6a-85ef-7f9857b41462",
      "uuid": "01d0583d-e8b3-483f-896f-08d2260b0dea",
      "docker_volume_size": 10,
      "stack_id": "dbfad3ec-2caf-43ef-839b-3c8dc0bdb1f8",
      "template_delete_on_termination": false,
      "health_status": "HEALTHY",
      "labels": {
        "cloud_provider_enabled": "true",
        "cloud_provider_tag": "v1.15.0",
        "heat_container_agent_tag": "hci-3.5-latest",
        "kube_version": "v1.15.6",
        "boot_volume_type": "default",
        "flannel_tag": "v0.11.0-amd64",
        "boot_volume_size": "10",
        "kube_tag": "v1.15.6",
        "docker_volume_type": "default"
      },
      "keypair": "key1",
      "links": [
        {
          "href": "https://<node_IP_addr>:9513/v1/clusters/01d0583d-e8b3-483f-896f-08d2260b0dea",
          "rel": "self"
        },
        {
          "href": "https://<node_IP_addr>:9513/clusters/01d0583d-e8b3-483f-896f-08d2260b0dea",
          "rel": "bookmark"
        }
      ],
      "master_count": 2,
      "flavor_id": "small",
      "node_count": 1,
      "master_flavor_id": "medium",
      "create_timeout": 60,
      "name": "k8s1"
    }
  ]
}