ByCloud Docs
GuidesCLIAPISDK
post/v1/kubernetes/clusters

Create Kubernetes cluster

Create a new Kubernetes cluster

Request Body

required

Content-Type: application/json

name

stringrequired

cluster_template_id

string<uuid>required

keypair

stringoptional

SSH keypair name

docker_volume_size

integeroptional

Docker volume size in GB

labels

objectoptional

master_flavor_id

string<uuid>optional

flavor_id

string<uuid>optional

master_count

integeroptional

Default: 1

node_count

integeroptional

Default: 1

create_timeout

integeroptional

fixed_network

string<uuid>optional

fixed_subnet

string<uuid>optional

floating_ip_enabled

booleanoptional

Default: true

master_lb_enabled

booleanoptional

Default: true

Responses

202

Cluster creation initiated

Content-Type: application/json

cluster

objectoptional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
403

Insufficient permissions

Content-Type: application/json

error

objectrequired
404

Cluster template not found

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X POST "https://api.spo1.mycloud.com/v1/kubernetes/clusters" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "production-cluster",
"cluster_template_id": "550e8400-e29b-41d4-a716-446655440000",
"keypair": "string",
"docker_volume_size": 1,
"labels": {},
"master_flavor_id": "550e8400-e29b-41d4-a716-446655440000",
"flavor_id": "550e8400-e29b-41d4-a716-446655440000",
"master_count": 1,
"node_count": 1,
"create_timeout": 1,
"fixed_network": "550e8400-e29b-41d4-a716-446655440000",
"fixed_subnet": "550e8400-e29b-41d4-a716-446655440000",
"floating_ip_enabled": true,
"master_lb_enabled": true
}'

Response

Cluster creation initiated

{
"cluster": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"crn": "crn:spo1:kubernetes:cluster:550e8400-e29b-41d4-a716-446655440000",
"name": "production-cluster",
"status": "CREATE_COMPLETE",
"status_reason": "string",
"health_status": "HEALTHY",
"health_status_reason": {},
"cluster_template_id": "550e8400-e29b-41d4-a716-446655440001",
"keypair": "my-keypair",
"docker_volume_size": 50,
"labels": {
"kube_dashboard_enabled": "true",
"auto_scaling_enabled": "true"
},
"master_flavor_id": "550e8400-e29b-41d4-a716-446655440000",
"flavor_id": "550e8400-e29b-41d4-a716-446655440000",
"master_count": 3,
"node_count": 5,
"create_timeout": 0,
"api_address": "https://192.168.1.100:6443",
"coe_version": "v1.28.0",
"master_addresses": [
"string"
],
"node_addresses": [
"string"
],
"stack_id": "550e8400-e29b-41d4-a716-446655440000",
"fixed_network": "550e8400-e29b-41d4-a716-446655440000",
"fixed_subnet": "550e8400-e29b-41d4-a716-446655440000",
"floating_ip_enabled": true,
"master_lb_enabled": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}