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.
/api/v1/kubernetes/Query parameters
project_idQueryintegerrequiredIdentifier of the project to scope the request to. Required integer project ID.
- required
- must be a valid integer project ID
example{{project_id}}apikeyQuerystringrequiredAPI key used to authenticate the create request.
- required
- non-empty string
example{{api_key}}locationQuerystringrequiredRegion in which the cluster will be provisioned.
- required
- must be a valid region name (e.g., Delhi, Chennai)
example{{location}}
Request body
application/json
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.
Display name of the cluster.
my-k8s-cluster- required
- max length 100 characters
Kubernetes version for the cluster. Must be a version supported by the selected master image (slug_name).
1.32- required
- must be a supported Kubernetes version (e.g., "1.32")
Master plan slug (the plan string from Master Plan). The region must support managed Kubernetes.
C3-4vCPU-8RAM-100DISK-3rdGen-K8s1_32-master-metal-lb-Delhi- required
- must be a valid master plan slug
ID of the VPC network to attach the cluster to.
12345- required
- must reference a VPC in the Running state in the same project and region
ID of the subnet within the VPC to place the cluster in.
null- optional
- when set, must be a Running subnet of the selected VPC
SKU ID of the master node plan (a specs.id from Master Plan).
1178- required
- must be a valid master (K8s_Master) SKU ID
ID of a security group to attach to the cluster nodes at create time.
12345- optional
- must be a valid security group ID in the same project and region
Whether to enable disk encryption on the cluster nodes.
true- optional
- defaults to false
Passphrase used to encrypt the disks. Required when isEncryptionEnabled is true.
<encryption-passphrase>- required when isEncryptionEnabled is true
Worker node pools to create with the cluster.
- required
- between 1 and 10 node pools
Responses
200Successful response
On success the cluster is created in a Creating state.
201Success