ByCloud Docs
GuidesCLIAPISDK
patch/v1/kubernetes/clusters/{cluster_id}

Update Kubernetes cluster

Update a Kubernetes cluster (e.g., scale nodes)

Path Parameters

cluster_id

string<uuid>required

path

Kubernetes Cluster ID

Example: "550e8400-e29b-41d4-a716-446655440000"

Request Body

required

Content-Type: application/json

node_count

integeroptional

New worker node count (for scaling)

Responses

202

Cluster update 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
404

Resource not found

Content-Type: application/json

error

objectrequired
409

Cluster is not in updatable state

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X PATCH "https://api.spo1.mycloud.com/v1/kubernetes/clusters/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"node_count": 1
}'

Response

Cluster update 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"
}
}