Modify a Kubernetes Cluster by ID
1 min
PUT
https://api.ionos.com/cloudapi/v6/k8s/{k8sClusterId}
Path Parameters
- k8sClusterIdstringrequiredDescription
Query Parameters
- prettybooleanDescriptionDefaulttrue
- depthinteger<int32>DescriptionDefault0Formatint32Minimum0Maximum10
Header Parameters
- X-Contract-Numberinteger<int32>DescriptionFormatint32
Body Parameters
- bodyKubernetesClusterForPutrequiredDescription
- metadataDatacenterElementMetadata
- etagstringExampleDescription
- createdDatestring<date-time>ExampleDescriptionFormatdate-time
- createdBystringExampleDescription
- createdByUserIdstringExampleDescription
- lastModifiedDatestring<date-time>ExampleDescriptionFormatdate-time
- lastModifiedBystringExampleDescription
- lastModifiedByUserIdstringExampleDescription
- statestring<AVAILABLE | INACTIVE | BUSY | DEPLOYING | ACTIVE | FAILED | SUSPENDED | FAILED_SUSPENDED | UPDATING | FAILED_UPDATING | DESTROYING | FAILED_DESTROYING | TERMINATED | HIBERNATING | FAILED_HIBERNATING | MAINTENANCE | FAILED_MAINTENANCE | UNKNOWN>ExampleDescriptionAllowedAVAILABLEINACTIVEBUSYDEPLOYINGACTIVEFAILEDSUSPENDEDFAILED_SUSPENDEDUPDATINGFAILED_UPDATINGDESTROYINGFAILED_DESTROYINGTERMINATEDHIBERNATINGFAILED_HIBERNATINGMAINTENANCEFAILED_MAINTENANCEUNKNOWN
- propertiesKubernetesClusterPropertiesForPutrequired
- namestringrequiredExampleDescription
- k8sVersionstringExampleDescription
- maintenanceWindowKubernetesMaintenanceWindow
- dayOfTheWeekstring<Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday>requiredExampleDescriptionAllowedMondayTuesdayWednesdayThursdayFridaySaturdaySunday
- timestringrequiredExampleDescription
- apiSubnetAllowListstring[]Example
[ "1.2.3.4/32", "2002::1234:abcd:ffff:c0a8:101/64", "1.2.3.4", "2002::1234:abcd:ffff:c0a8:101" ]
Description - s3BucketsS3Bucket[]Description
- namestringrequiredExampleDescription
- entitiesKubernetesClusterEntities
- nodepoolsKubernetesNodePools
- idstringExampleDescription
- typestring<collection>ExampleDescriptionAllowedcollection
- hrefstring<uri>ExampleDescriptionFormaturi
- itemsKubernetesNodePool[]Description
- idstringExampleDescription
- typestring<nodepool>DescriptionAllowednodepool
- hrefstring<uri>ExampleDescriptionFormaturi
- metadataDatacenterElementMetadata
- etagstringExampleDescription
- createdDatestring<date-time>ExampleDescriptionFormatdate-time
- createdBystringExampleDescription
- createdByUserIdstringExampleDescription
- lastModifiedDatestring<date-time>ExampleDescriptionFormatdate-time
- lastModifiedBystringExampleDescription
- lastModifiedByUserIdstringExampleDescription
- statestring<AVAILABLE | INACTIVE | BUSY | DEPLOYING | ACTIVE | FAILED | SUSPENDED | FAILED_SUSPENDED | UPDATING | FAILED_UPDATING | DESTROYING | FAILED_DESTROYING | TERMINATED | HIBERNATING | FAILED_HIBERNATING | MAINTENANCE | FAILED_MAINTENANCE | UNKNOWN>ExampleDescriptionAllowedAVAILABLEINACTIVEBUSYDEPLOYINGACTIVEFAILEDSUSPENDEDFAILED_SUSPENDEDUPDATINGFAILED_UPDATINGDESTROYINGFAILED_DESTROYINGTERMINATEDHIBERNATINGFAILED_HIBERNATINGMAINTENANCEFAILED_MAINTENANCEUNKNOWN
- propertiesKubernetesNodePoolPropertiesrequired
- namestringrequiredExampleDescription
- datacenterIdstringrequiredExampleDescription
- nodeCountintegerrequiredExampleDescription
- serverTypeKubernetesNodePoolServerTypeDescriptionDefaultDedicatedCore
- cpuFamilystringExampleDescription
- coresCountintegerrequiredExampleDescription
- ramSizeintegerrequiredExampleDescription
- availabilityZonestring<AUTO | ZONE_1 | ZONE_2>requiredExampleDescriptionAllowedAUTOZONE_1ZONE_2
- storageTypestring<HDD | SSD>requiredExampleDescriptionAllowedHDDSSD
- storageSizeintegerrequiredExampleDescription
- k8sVersionstringExampleDescription
- maintenanceWindowKubernetesMaintenanceWindow
- dayOfTheWeekstring<Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday>requiredExampleDescriptionAllowedMondayTuesdayWednesdayThursdayFridaySaturdaySunday
- timestringrequiredExampleDescription
- autoScalingKubernetesAutoScaling
- minNodeCountinteger<int32>requiredExampleDescriptionFormatint32
- maxNodeCountinteger<int32>requiredExampleDescriptionFormatint32
- lansKubernetesNodePoolLan[]Description
- datacenterIdstringExampleDescription
- idinteger<int32>requiredExampleDescriptionFormatint32
- dhcpbooleanExampleDescription
- routesKubernetesNodePoolLanRoutes[]Description
- Max depth limit reached
- labelsKubernetesNodePoolLabelDescription
- annotationsKubernetesNodePoolAnnotationDescription
- taintsKubernetesNodePoolTaint[]Description
- keystringrequiredExampleDescriptionMax Length317Pattern^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
- valuestringExampleDescriptionMax Length63Pattern^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
- effectTaintEffectrequiredExampleDescription
- Max depth limit reached
- publicIpsstring[]Example
[ "81.173.1.2", "82.231.2.5", "92.221.2.4" ]
Description - availableUpgradeVersionsstring[]Example
[ "1.16.4", "1.17.7" ]
Description
Responses
202
- KubernetesCluster
- idstringExampleDescription
- typestring<k8s>DescriptionAllowedk8s
- hrefstring<uri>ExampleDescriptionFormaturi
- metadataDatacenterElementMetadata
- etagstringExampleDescription
- createdDatestring<date-time>ExampleDescriptionFormatdate-time
- createdBystringExampleDescription
- createdByUserIdstringExampleDescription
- lastModifiedDatestring<date-time>ExampleDescriptionFormatdate-time
- lastModifiedBystringExampleDescription
- lastModifiedByUserIdstringExampleDescription
- statestring<AVAILABLE | INACTIVE | BUSY | DEPLOYING | ACTIVE | FAILED | SUSPENDED | FAILED_SUSPENDED | UPDATING | FAILED_UPDATING | DESTROYING | FAILED_DESTROYING | TERMINATED | HIBERNATING | FAILED_HIBERNATING | MAINTENANCE | FAILED_MAINTENANCE | UNKNOWN>ExampleDescriptionAllowedAVAILABLEINACTIVEBUSYDEPLOYINGACTIVEFAILEDSUSPENDEDFAILED_SUSPENDEDUPDATINGFAILED_UPDATINGDESTROYINGFAILED_DESTROYINGTERMINATEDHIBERNATINGFAILED_HIBERNATINGMAINTENANCEFAILED_MAINTENANCEUNKNOWN
- propertiesKubernetesClusterPropertiesrequired
- namestringrequiredExampleDescription
- k8sVersionstringExampleDescription
- maintenanceWindowKubernetesMaintenanceWindow
- dayOfTheWeekstring<Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday>requiredExampleDescriptionAllowedMondayTuesdayWednesdayThursdayFridaySaturdaySunday
- timestringrequiredExampleDescription
- availableUpgradeVersionsstring[]Example
[ "1.16.4", "1.17.7" ]
Description - viableNodePoolVersionsstring[]Example
[ "1.17.7", "1.18.2" ]
Description - publicbooleanDescriptionDefaulttrue
- locationstringExampleDescription
- natGatewayIpstringExampleDescription
- nodeSubnetstringExampleDescription
- apiSubnetAllowListstring[]Example
[ "1.2.3.4/32", "2002::1234:abcd:ffff:c0a8:101/64", "1.2.3.4", "2002::1234:abcd:ffff:c0a8:101" ]
Description - s3BucketsS3Bucket[]Description
- namestringrequiredExampleDescription
- entitiesKubernetesClusterEntities
- nodepoolsKubernetesNodePools
- idstringExampleDescription
- typestring<collection>ExampleDescriptionAllowedcollection
- hrefstring<uri>ExampleDescriptionFormaturi
- itemsKubernetesNodePool[]Description
- idstringExampleDescription
- typestring<nodepool>DescriptionAllowednodepool
- hrefstring<uri>ExampleDescriptionFormaturi
- metadataDatacenterElementMetadata
- etagstringExampleDescription
- createdDatestring<date-time>ExampleDescriptionFormatdate-time
- createdBystringExampleDescription
- createdByUserIdstringExampleDescription
- lastModifiedDatestring<date-time>ExampleDescriptionFormatdate-time
- lastModifiedBystringExampleDescription
- lastModifiedByUserIdstringExampleDescription
- statestring<AVAILABLE | INACTIVE | BUSY | DEPLOYING | ACTIVE | FAILED | SUSPENDED | FAILED_SUSPENDED | UPDATING | FAILED_UPDATING | DESTROYING | FAILED_DESTROYING | TERMINATED | HIBERNATING | FAILED_HIBERNATING | MAINTENANCE | FAILED_MAINTENANCE | UNKNOWN>ExampleDescriptionAllowedAVAILABLEINACTIVEBUSYDEPLOYINGACTIVEFAILEDSUSPENDEDFAILED_SUSPENDEDUPDATINGFAILED_UPDATINGDESTROYINGFAILED_DESTROYINGTERMINATEDHIBERNATINGFAILED_HIBERNATINGMAINTENANCEFAILED_MAINTENANCEUNKNOWN
- propertiesKubernetesNodePoolPropertiesrequired
- namestringrequiredExampleDescription
- datacenterIdstringrequiredExampleDescription
- nodeCountintegerrequiredExampleDescription
- serverTypeKubernetesNodePoolServerTypeDescriptionDefaultDedicatedCore
- cpuFamilystringExampleDescription
- coresCountintegerrequiredExampleDescription
- ramSizeintegerrequiredExampleDescription
- availabilityZonestring<AUTO | ZONE_1 | ZONE_2>requiredExampleDescriptionAllowedAUTOZONE_1ZONE_2
- storageTypestring<HDD | SSD>requiredExampleDescriptionAllowedHDDSSD
- storageSizeintegerrequiredExampleDescription
- k8sVersionstringExampleDescription
- maintenanceWindowKubernetesMaintenanceWindow
- dayOfTheWeekstring<Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday>requiredExampleDescriptionAllowedMondayTuesdayWednesdayThursdayFridaySaturdaySunday
- timestringrequiredExampleDescription
- autoScalingKubernetesAutoScaling
- minNodeCountinteger<int32>requiredExampleDescriptionFormatint32
- maxNodeCountinteger<int32>requiredExampleDescriptionFormatint32
- lansKubernetesNodePoolLan[]Description
- datacenterIdstringExampleDescription
- idinteger<int32>requiredExampleDescriptionFormatint32
- dhcpbooleanExampleDescription
- routesKubernetesNodePoolLanRoutes[]Description
- Max depth limit reached
- labelsKubernetesNodePoolLabelDescription
- annotationsKubernetesNodePoolAnnotationDescription
- taintsKubernetesNodePoolTaint[]Description
- keystringrequiredExampleDescriptionMax Length317Pattern^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/)?([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$
- valuestringExampleDescriptionMax Length63Pattern^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
- effectTaintEffectrequiredExampleDescription
- Max depth limit reached
- publicIpsstring[]Example
[ "81.173.1.2", "82.231.2.5", "92.221.2.4" ]
Description - availableUpgradeVersionsstring[]Example
[ "1.16.4", "1.17.7" ]
Description
Response Headers
- X-RateLimit-Remaininginteger<int32>DescriptionFormatint32
- X-RateLimit-Limitinteger<int32>DescriptionFormatint32
- X-RateLimit-Burstinteger<int32>DescriptionFormatint32
default
- Error
- httpStatusinteger<int32>ExampleDescriptionFormatint32
- messagesErrorMessage[]
- errorCodestringExampleDescription
- messagestringExampleDescription
curl
curl --request PUT \
--url 'https://api.ionos.com/cloudapi/v6/k8s/{k8sClusterId}?pretty=true&depth=integer%3Cint32%3E' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"properties": {
"name": "k8s",
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"s3Buckets": [
{
"name": "My Bucket"
}
]
},
"entities": {
"nodepools": {
"items": [
{
"properties": {
"name": "K8s-node-pool",
"datacenterId": "1e072e52-2ed3-492f-b6b6-c6b116907521",
"nodeCount": 2,
"serverType": "DedicatedCore",
"coresCount": 4,
"ramSize": 2048,
"availabilityZone": "AUTO",
"storageType": "HDD",
"storageSize": 100,
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"autoScaling": {
"minNodeCount": 1,
"maxNodeCount": 3
},
"lans": [
{
"id": 3
}
],
"taints": [
{
"key": "dedicated",
"effect": "NoSchedule"
}
]
}
}
]
}
}
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"properties": {
"name": "k8s",
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"s3Buckets": [
{
"name": "My Bucket"
}
]
},
"entities": {
"nodepools": {
"items": [
{
"properties": {
"name": "K8s-node-pool",
"datacenterId": "1e072e52-2ed3-492f-b6b6-c6b116907521",
"nodeCount": 2,
"serverType": "DedicatedCore",
"coresCount": 4,
"ramSize": 2048,
"availabilityZone": "AUTO",
"storageType": "HDD",
"storageSize": 100,
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"autoScaling": {
"minNodeCount": 1,
"maxNodeCount": 3
},
"lans": [
{
"id": 3
}
],
"taints": [
{
"key": "dedicated",
"effect": "NoSchedule"
}
]
}
}
]
}
}
});
var requestOptions = {
method: 'PUT',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.ionos.com/cloudapi/v6/k8s/{k8sClusterId}?pretty=true&depth=integer<int32>", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.ionos.com/cloudapi/v6/k8s/{k8sClusterId}?pretty=true&depth=integer<int32>")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"properties": {
"name": "k8s",
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"s3Buckets": [
{
"name": "My Bucket"
}
]
},
"entities": {
"nodepools": {
"items": [
{
"properties": {
"name": "K8s-node-pool",
"datacenterId": "1e072e52-2ed3-492f-b6b6-c6b116907521",
"nodeCount": 2,
"serverType": "DedicatedCore",
"coresCount": 4,
"ramSize": 2048,
"availabilityZone": "AUTO",
"storageType": "HDD",
"storageSize": 100,
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"autoScaling": {
"minNodeCount": 1,
"maxNodeCount": 3
},
"lans": [
{
"id": 3
}
],
"taints": [
{
"key": "dedicated",
"effect": "NoSchedule"
}
]
}
}
]
}
}
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.ionos.com/cloudapi/v6/k8s/{k8sClusterId}?pretty=true&depth=integer<int32>"
payload = json.dumps({
"properties": {
"name": "k8s",
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"s3Buckets": [
{
"name": "My Bucket"
}
]
},
"entities": {
"nodepools": {
"items": [
{
"properties": {
"name": "K8s-node-pool",
"datacenterId": "1e072e52-2ed3-492f-b6b6-c6b116907521",
"nodeCount": 2,
"serverType": "DedicatedCore",
"coresCount": 4,
"ramSize": 2048,
"availabilityZone": "AUTO",
"storageType": "HDD",
"storageSize": 100,
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"autoScaling": {
"minNodeCount": 1,
"maxNodeCount": 3
},
"lans": [
{
"id": 3
}
],
"taints": [
{
"key": "dedicated",
"effect": "NoSchedule"
}
]
}
}
]
}
}
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
202
// Successful operation
{
"id": "1e072e52-2ed3-492f-b6b6-c6b116907527",
"type": "",
"href": "https://api.ionos.com/cloudapi/v6/k8s/b0a6ed23-0636-4bd4-94aa-be01c355af1d",
"metadata": {
"etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
"createdDate": "2015-12-04T14:34:09.809Z",
"createdBy": "[email protected]",
"createdByUserId": "[email protected]",
"lastModifiedDate": "2015-12-04T14:34:09.809Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
"state": "AVAILABLE"
},
"properties": {
"name": "k8s",
"k8sVersion": "1.15.4",
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"availableUpgradeVersions": [
""
],
"viableNodePoolVersions": [
""
],
"public": false,
"location": "de/fra",
"natGatewayIp": "198.51.100.100",
"nodeSubnet": "192.168.0.0/16",
"apiSubnetAllowList": [
""
],
"s3Buckets": [
{
"name": "My Bucket"
}
]
},
"entities": {
"nodepools": {
"id": "1e072e52-2ed3-492f-b6b6-c6b116907527/nodepools",
"type": "collection",
"href": "https://api.ionos.com/cloudapi/v6/k8s/30f8a4f6-6515-4c34-b49d-dea807453b90/nodepools",
"items": [
{
"id": "1e072e52-2ed3-492f-b6b6-c6b116907527",
"type": "",
"href": "https://api.ionos.com/cloudapi/v6/k8s/30f8a4f6-6515-4c34-b49d-dea807453b90/nodepools/4735f530-4279-42f3-9562-386143098038",
"metadata": {
"etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
"createdDate": "2015-12-04T14:34:09.809Z",
"createdBy": "[email protected]",
"createdByUserId": "[email protected]",
"lastModifiedDate": "2015-12-04T14:34:09.809Z",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
"state": "AVAILABLE"
},
"properties": {
"name": "K8s-node-pool",
"datacenterId": "1e072e52-2ed3-492f-b6b6-c6b116907521",
"nodeCount": 2,
"serverType": "",
"cpuFamily": "INTEL_ICELAKE",
"coresCount": 4,
"ramSize": 2048,
"availabilityZone": "AUTO",
"storageType": "HDD",
"storageSize": 100,
"k8sVersion": "1.15.4",
"maintenanceWindow": {
"dayOfTheWeek": "Monday",
"time": "13:00:00"
},
"autoScaling": {
"minNodeCount": 1,
"maxNodeCount": 3
},
"lans": [
{
"datacenterId": "00000000-0000-0000-0000-000000000000",
"id": 3,
"dhcp": true,
"routes": [
{
"": ""
}
]
}
],
"labels": {},
"annotations": {},
"taints": [
{
"key": "dedicated",
"value": "gpu-workloads",
"effect": "NoSchedule"
}
],
"publicIps": [
""
],
"availableUpgradeVersions": [
""
]
}
}
]
}
}
}default
// Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).
{
"httpStatus": 400,
"messages": [
{
"errorCode": "123",
"message": "Error message example."
}
]
}Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.