Create a Kubernetes Cluster
1 min
POST
https://api.ionos.com/cloudapi/v6/k8s
prettyboolean<p>Controls whether the response is pretty-printed (with indentations and new lines).</p>
depthinteger<int32><p>Controls the detail depth of the response objects.
GET /datacenters/[ID]
- depth=0: Only direct properties are included; children (servers and other elements) are not included.
- depth=1: Direct properties and children references are included.
- depth=2: Direct properties and children properties are included.
- depth=3: Direct properties and children properties and children's children are included.
- depth=... and so on</p>
acceptstringGenerated from available response content types
X-Contract-Numberinteger<int32><p>Users with multiple contracts must provide the contract number, for which all API requests are to be executed.</p>
bodyobjectThe Kubernetes cluster to create.
202Successful operation
default<p>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).</p>
curl --request POST \
--url 'https://api.ionos.com/cloudapi/v6/k8s?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"
},
"public": true,
"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"
}
]
}
}
]
}
}
}'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.