K3d: [BUG] Support for 1.19, k3s version is hardcoded.

Created on 30 Sep 2020  路  2Comments  路  Source: rancher/k3d

What did you do

  • How was the cluster created?

    • k3d cluster create mycluster
  • What did you do afterwards?

    • docker images

What did you expect to happen

According to the source code it should pull the latest k3s version which is currently 1.19 but it doesnt. It always gets the hardcoded 1.18 version from the version.go file. I also try preloading rancher/k3s:latest and the 1.19 tag and still didnt work.

Which OS & Architecture

  • Linux - Ubuntu Focal 20.04.1

Which version of k3d

  • 3.0.2

Which version of docker

  • 19.x
bug not a bug

All 2 comments

Hi @gabrielcalderon , thanks for opening this issue :)
We have to hardcode the default version in the code to avoid runtime issues with trying to fetch the latest version (also, there are API limits everywhere, so this is fairly impractical and error-prone).
However, there's the --image flag for this :+1:
E.g. in your case you'd use k3d cluster create mycluster --image rancher/k3s:v1.19.2-k3s1

@iwilltry42 Thanks! I will give that a try!

Was this page helpful?
0 / 5 - 0 ratings