API
Kubernetes
Create cluster

Create a Kubernetes Cluster

  • Name
    post
    Type
    /v1/kubernetes
    Description

    Send a POST request to create a kubernetes cluster.

Request

Cluster Attributes

Required

  • Name
    name
    Type
    string
    Description

    New Human-readble name given to the k8s cluster at its creation.

  • Name
    version
    Type
    string
    Description

    The slug used to identify the k8s version selected by the user.

  • Name
    region
    Type
    string
    Description

    The slug used to identify the region where the user will choose to deploy the k8s cluster.

  • Name
    node_pool
    Type
    object
    Description

    Object contains configuration of node pools. See node pool attributes.

Optional

  • Name
    project_uuid
    Type
    string
    Description

    The project universal unique identifier where the k8s cluster will be deployed. If the user didn't provide the UUID, the system will replace the k8s cluster in the user default project.

Node Pool Attributes

Required

  • Name
    name
    Type
    string
    Description

    New Human-readble name given to the node pool at its creation.

  • Name
    size
    Type
    string
    Description

    The slug used to identify the size of the node pool.

  • Name
    count
    Type
    integer
    Description

    The number of nodes in the node pool.

Example

curl -X POST "https://api.simplystack.com/v1/kubernetes" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
  -d '{"name": "new-k8s", "region": "fra", "version": "1.23.0-00", "node_pool": {"size": "b-1vcpu-2gb", "count":2, "name":"backend-pool"}}'
 

Response

Attributes

See kubernetes cluster model.

Example

json
{
  "kubernetes": {
    "uuid": "236fa2a0-96d6-4c14-8dbc-08db28f3513b",
    "tags": ["k8s:236fa2a0-96d6-4c14-8dbc-08db28f3513b", "k8s"],
    "ipv4": "50.3.80.4",
    "name": "k8s-unhappy-example",
    "task": {
      "id": 1,
      "name": "create",
      "description": {
        "progress": "Kubernetes cluster is creating.",
        "completed": "Kubernetes cluster created."
      }
    },
    "region": {
      "slug": "fra",
      "name": "Frankfurt",
      "features": [
        "vpc",
        "volumes",
        "buckets",
        "databases",
        "kubernetes",
        "floating_ips",
        "load_balancers"
      ],
      "available": true
    },
    "version": {
      "slug": "1-23-0",
      "version": "1.23.0-00",
      "min_vcpu": 1,
      "min_disk": 53687091200,
      "available": true,
      "min_memory": 2147483648
    },
    "endpoint": "https://236fa2a0-96d6-4c14-8dbc-08db28f3513b.k8s.onhubgridcloud.com",
    "created_at": "2024-01-08T04:18:17.689771Z",
    "node_pools": [
      {
        "id": "4fb5575c-baf3-4580-9ad4-fa1cec526341",
        "name": "complicated-cookie",
        "size": {
          "slug": "b-1vcpu-2gb",
          "vcpu": 1,
          "disk": 53687091200,
          "memory": 2147483648,
          "category": {
            "name": "basic",
            "premium": false,
            "cpu_model": "INTEL",
            "description": "Basic"
          },
          "bandwidth": 2199023255552,
          "available": true,
          "price_hourly": 0.014,
          "price_monthly": 10.0,
          "snapshots_limit": 1
        },
        "nodes": [
          {
            "id": "af44f920-6b41-4854-a4ec-0515e5a1e159",
            "name": "complicated-cookie-wzbp7v",
            "created_at": "2024-01-08T04:18:17.771223Z"
          }
        ]
      }
    ],
    "cluster_subnet": "10.244.0.0/16",
    "service_subnet": "10.245.0.0/16"
  }
}