Modify a Kubernetes Node Pool by ID
1 min
PUT
https://api.ionos.com/cloudapi/v6/k8s/{k8sClusterId}/nodepools/{nodepoolId}
Path Parameters
- k8sClusterIdstringrequiredDescription
- nodepoolIdstringrequiredDescription
Query Parameters
- prettybooleanDescriptionDefaulttrue
- depthinteger<int32>DescriptionDefault0Formatint32Minimum0Maximum10
Header Parameters
- X-Contract-Numberinteger<int32>DescriptionFormatint32
Body Parameters
- bodyKubernetesNodePoolForPutrequiredDescription
- 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
- propertiesKubernetesNodePoolPropertiesForPutrequired
- namestringExampleDescription
- nodeCountintegerrequiredExampleDescription
- serverTypeKubernetesNodePoolServerTypeDescriptionDefaultDedicatedCore
- 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
- networkstringExampleDescription
- gatewayIpstringExampleDescription
- 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
- publicIpsstring[]Example
[ "81.173.1.2", "82.231.2.5", "92.221.2.4" ]
Description
Responses
202
- KubernetesNodePool
- 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
- networkstringExampleDescription
- gatewayIpstringExampleDescription
- 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
- 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}/nodepools/{nodepoolId}?pretty=true&depth=integer%3Cint32%3E' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"properties": {
"nodeCount": 2,
"serverType": "DedicatedCore",
"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": {
"nodeCount": 2,
"serverType": "DedicatedCore",
"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}/nodepools/{nodepoolId}?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}/nodepools/{nodepoolId}?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": {
"nodeCount": 2,
"serverType": "DedicatedCore",
"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}/nodepools/{nodepoolId}?pretty=true&depth=integer<int32>"
payload = json.dumps({
"properties": {
"nodeCount": 2,
"serverType": "DedicatedCore",
"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/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": [
{
"network": "1.2.3.4/24",
"gatewayIp": "10.1.5.16"
}
]
}
],
"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.