SKE: Can not deploy latest K8s Version (preview)
Hi,
the latest K8s Version in SKE is 1.29 in state preview.
Trying to use it with the TF provider I got the error:
Plan: 1 to add, 0 to change, 0 to destroy.
stackit_ske_cluster.dnse2e: Creating...
╷
│ Error: Error creating/updating cluster
│
│ with stackit_ske_cluster.xxxxx,
│ on ske.tf line 1, in resource "stackit_ske_cluster" "xxxxx":
│ 1: resource "stackit_ske_cluster" "xxxxx" {
│
│ Creating cluster config API payload: getting latest matching kubernetes version: provided version is not one of the available kubernetes versions, available versions are: 1.26.15,1.27.14,1.28.10,1.27.15,1.28.11,1.29.6
TF code (some fields x-out):
resource "stackit_ske_cluster" "xxxxx" {
name = "test"
project_id = "xxxxxxxxxxxxxxx"
kubernetes_version_min = "1.29"
node_pools = [
{
name = "pool1"
machine_type = "c1.2"
minimum = "1"
maximum = "3"
availability_zones = ["eu01-1"]
}
]
}
terraform {
required_providers {
stackit = {
source = "stackitcloud/stackit"
version = "0.22.0"
}
}
}
The function getLatestSupportedKubernetesVersion only takes care about versions in "state supported".
But as a TF user I also want to use/test the new preview versions of Kubernetes.
(~~The same probably applies to "state deprecated" version - at least as long as they are able to be provisioned~~"state deprecated" can not be deployed anymore)
IMHO the logic needs to be adapted for kubernetes_version_min to something like:
- search for a version in state "supported"
- if no result - search for a version in state "preview"
- ~~if no result - search for a version in state "deprecated"~~
This would result into having the "bestSupported" kubernetes_version.
Hi @Slm0n87,
That is a good suggestion, thanks! We will plan it and soon will work on extending the current logic.
I updated my last comment after clarification that state "deprecated" can not be deployed anymore.