---
title: Obtenir la version Kubernetes par défaut
slug: obtenir-la-version-kubernetes-par-defaut
docTags: 
createdAt: 2026-06-04T15:50:56.155Z
---

{
  "id": "_jgidziIDypyN8te9KIbH",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.ionos.com/cloudapi/v6/k8s/versions/default",
    "servers": [
      {
        "url": "https://api.ionos.com/cloudapi/v6/k8s/versions/default"
      }
    ],
    "name": "Get Default Kubernetes Version",
    "description": "Retrieves the current default K8s version to be used by the clusters and node pools.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "BasicAuthentication",
          "name": "BasicAuthentication",
          "kind": "optional",
          "type": "http",
          "description": "<p>You will need to base64 encode the string containing your credentials. \nNote:\n\n</p>",
          "scheme": "basic"
        },
        {
          "id": "TokenAuthentication",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Please provide header value as 'Bearer ' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "X-RateLimit-Remaining",
            "type": "integer<int32>",
            "description": "The number of requests that can still be made without triggering a failure response.",
            "format": "int32"
          },
          {
            "kind": "optional",
            "name": "X-RateLimit-Limit",
            "type": "integer<int32>",
            "description": "The average number of requests per minute allowed.",
            "format": "int32"
          },
          {
            "kind": "optional",
            "name": "X-RateLimit-Burst",
            "type": "integer<int32>",
            "description": "The maximum number of concurrent API requests allowed.",
            "format": "int32"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "string",
            "example": "1.21.4",
            "description": "",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "<p>Any erroneous status code: 401 (auth error), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type), 422 (validation error), 500 (server error), 503 (maintenance)</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "httpStatus",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "description": "HTTP status code of the operation.",
                "example": 400,
                "format": "int32"
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/ErrorMessage",
                "customType": "ErrorMessage[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "Application internal error code.",
                    "example": "123"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "<p>A human-readable message.</p>",
                    "example": "Error message example."
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "4upgWDjsYwOdrMZzCKe7G",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.ionos.com/cloudapi/v6/k8s/versions/default \\\n     --header 'accept: application/json'"
        },
        {
          "id": "7ZUvhQzAJQ8M6tlsSXAhl",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.ionos.com/cloudapi/v6/k8s/versions/default\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "BRuThFs_-IJtgn_Ryhklv",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.ionos.com/cloudapi/v6/k8s/versions/default\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "XmdrVcHIPcfVg5ZGcZgNx",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.ionos.com/cloudapi/v6/k8s/versions/default\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "4upgWDjsYwOdrMZzCKe7G"
    },
    "results": {
      "languages": [
        {
          "id": "v3uZ7Nzus0fC6k8a6JfuY",
          "language": "200",
          "code": "// Successful operation\n\"1.21.4\""
        },
        {
          "id": "5ZOXaAo94KPVKlNnkg9kb",
          "language": "default",
          "code": "// Any erroneous status code: 401 (auth error), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type), 422 (validation error), 500 (server error), 503 (maintenance)\n{\n  \"httpStatus\": 400,\n  \"messages\": [\n    {\n      \"errorCode\": \"123\",\n      \"message\": \"Error message example.\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "v3uZ7Nzus0fC6k8a6JfuY"
    }
  },
  "children": [
    {
      "text": "",
      "id": "fxS8IboO3-g4O99agIBi8"
    }
  ]
}