Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SKE: Can not deploy latest K8s Version (preview) #442

Open
slm0n87 opened this issue Jul 1, 2024 · 3 comments
Open

SKE: Can not deploy latest K8s Version (preview) #442

slm0n87 opened this issue Jul 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@slm0n87
Copy link
Member

slm0n87 commented Jul 1, 2024

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"
    }
  }
}
@slm0n87
Copy link
Member Author

slm0n87 commented Jul 1, 2024

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.

@joaopalet joaopalet added the enhancement New feature or request label Jul 1, 2024
@joaopalet
Copy link
Contributor

Hi @slm0n87,

That is a good suggestion, thanks! We will plan it and soon will work on extending the current logic.

@slm0n87
Copy link
Member Author

slm0n87 commented Jul 2, 2024

I updated my last comment after clarification that state "deprecated" can not be deployed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants