Skip to main content
POST
/
project
/
{project_id}
/
location
/
{location}
/
kubernetes-cluster
/
{kubernetes_cluster_reference}
curl -X POST "https://api.ubicloud.com/project/{project_id}/location/eu-central-h1/kubernetes-cluster/my-k8s-cluster" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "version": "1.28.0",
    "worker_size": "standard-4",
    "cp_nodes": 3,
    "worker_nodes": 3
  }'
{
  "id": "kcqxhqbg86sj0ng5e9ck5n191z",
  "name": "my-k8s-cluster",
  "location": "eu-central-h1",
  "version": "1.28.0",
  "display_state": "creating",
  "cp_node_count": 3,
  "node_size": "standard-2",
  "cp_vms": [],
  "nodepools": [
    {
      "id": "knqxhqbg86sj0ng5e9ck5n191z",
      "name": "default-pool",
      "kubernetes_cluster_id": "kcqxhqbg86sj0ng5e9ck5n191z",
      "node_count": 3,
      "node_size": "standard-4",
      "vms": []
    }
  ],
  "services_load_balancer_url": null
}

Path Parameters

project_id
string
required
ID of the projectPattern: ^pj[0-9a-hj-km-np-tv-z]{24}$Example: pjkkmx0f2vke4h36nk9cm8v8q0
location
string
required
The Ubicloud location/regionExample: eu-central-h1
kubernetes_cluster_reference
string
required
Kubernetes cluster ID or namePattern: ^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?$

Body Parameters

version
string
required
Version of the kubernetes clusterExample: 1.28.0
worker_size
string
required
Size of each worker VMExample: standard-4
cp_nodes
integer
Number of control plane nodesExample: 3
worker_nodes
integer
Number of worker nodesExample: 3

Response

id
string
required
ID of the KubernetesClusterPattern: ^kc[0-9a-hj-km-np-tv-z]{24}$
name
string
required
Name of the KubernetesCluster
location
string
required
Location of the KubernetesCluster
version
string
required
Version of the KubernetesCluster
display_state
string
State of the KubernetesCluster
cp_node_count
integer
required
Number of control plane nodes
node_size
string
required
Size of each control plane node
cp_vms
array
Array of control plane VM objects
nodepools
array
Array of nodepool objects
services_load_balancer_url
string
Services load balancer URL
curl -X POST "https://api.ubicloud.com/project/{project_id}/location/eu-central-h1/kubernetes-cluster/my-k8s-cluster" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "version": "1.28.0",
    "worker_size": "standard-4",
    "cp_nodes": 3,
    "worker_nodes": 3
  }'
{
  "id": "kcqxhqbg86sj0ng5e9ck5n191z",
  "name": "my-k8s-cluster",
  "location": "eu-central-h1",
  "version": "1.28.0",
  "display_state": "creating",
  "cp_node_count": 3,
  "node_size": "standard-2",
  "cp_vms": [],
  "nodepools": [
    {
      "id": "knqxhqbg86sj0ng5e9ck5n191z",
      "name": "default-pool",
      "kubernetes_cluster_id": "kcqxhqbg86sj0ng5e9ck5n191z",
      "node_count": 3,
      "node_size": "standard-4",
      "vms": []
    }
  ],
  "services_load_balancer_url": null
}

Build docs developers (and LLMs) love