Skip to main content

Create Kubernetes Cluster

Provisions a managed Kubernetes cluster. The cluster is created with a single master node (sized by sku_id from Master Plan) and one or more worker node pools (node_pools, 1-10 pools). Each node pool runs identical worker nodes from the selected worker plan and can define elastic (metric based) and/or scheduled (cron based) autoscaling via elasticity_dict and scheduled_dict.

The cluster must be attached to a VPC (vpc_id, which must be in the Running state), and can optionally attach a security group and enable disk encryption. On success the cluster is returned in a Creating state - poll List or Detail until it reaches Running.

POST/api/v1/kubernetes/

Query parameters

  • project_idQueryintegerrequired

    Identifier of the project to scope the request to. Required integer project ID.

    • required
    • must be a valid integer project ID
    example{{project_id}}
  • apikeyQuerystringrequired

    API key used to authenticate the create request.

    • required
    • non-empty string
    example{{api_key}}
  • locationQuerystringrequired

    Region in which the cluster will be provisioned.

    • required
    • must be a valid region name (e.g., Delhi, Chennai)
    example{{location}}

Request body

application/json

object

Create payload for a Kubernetes cluster. Send the master node sizing (sku_id, version, slug_name), the VPC to attach (vpc_id), and one or more worker node_pools (1-10). For each node pool, send elasticity_dict for metric-based scaling, scheduled_dict for cron-based scaling, or both - and set policy_type accordingly.

namestringrequired

Display name of the cluster.

examplemy-k8s-cluster
  • required
  • max length 100 characters
versionstringrequired

Kubernetes version for the cluster. Must be a version supported by the selected master image (slug_name).

example1.32
  • required
  • must be a supported Kubernetes version (e.g., "1.32")
slug_namestringrequired

Master plan slug (the plan string from Master Plan). The region must support managed Kubernetes.

exampleC3-4vCPU-8RAM-100DISK-3rdGen-K8s1_32-master-metal-lb-Delhi
  • required
  • must be a valid master plan slug
vpc_idintegerrequired

ID of the VPC network to attach the cluster to.

example12345
  • required
  • must reference a VPC in the Running state in the same project and region
subnet_idinteger

ID of the subnet within the VPC to place the cluster in.

examplenull
  • optional
  • when set, must be a Running subnet of the selected VPC
sku_idintegerrequired

SKU ID of the master node plan (a specs.id from Master Plan).

example1178
  • required
  • must be a valid master (K8s_Master) SKU ID
security_group_idinteger

ID of a security group to attach to the cluster nodes at create time.

example12345
  • optional
  • must be a valid security group ID in the same project and region
isEncryptionEnabledboolean

Whether to enable disk encryption on the cluster nodes.

exampletrue
  • optional
  • defaults to false
encryption_passphrasestring

Passphrase used to encrypt the disks. Required when isEncryptionEnabled is true.

example<encryption-passphrase>
  • required when isEncryptionEnabled is true
node_poolsarrayrequired

Worker node pools to create with the cluster.

  • required
  • between 1 and 10 node pools

Responses

200Successful response
object

On success the cluster is created in a Creating state.

codeinteger
example201
dataobject
errorsobject
messagestring
exampleSuccess