Skip to content

Add --kubernetes-version to container cluster create - #2510

Draft
resker wants to merge 3 commits into
apple:mainfrom
resker:kubernetes-version-flag
Draft

resker wants to merge 3 commits into
apple:mainfrom
resker:kubernetes-version-flag

Conversation

@resker

@resker resker commented Nov 13, 2026

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

For #2508. @jglogan @katiewasnothere, here's a draft implementation to consider. Happy to adjust it based on your feedback.

This includes #2507's commit (default to 1.37). If #2507 lands, I'll rebase onto it.

Two commits, so you can take either step:

  1. List the supported versions: a table in ClusterHelper, newest first, each minor pinned to a kind v0.33.0 image by digest (1.37.0, 1.36.4, 1.35.8). The first entry is the default. docs/cluster.md shows the same table, and a test keeps them in sync. If you'd rather start with just the docs, this commit stands on its own.
  2. Add --kubernetes-version: container cluster create --kubernetes-version 1.36 picks that minor's image. It can't be combined with --node-image; an unsupported version fails with the supported list; and --node-image with an image outside the table still works, with a warning.

On the point about versions needing bootstrapper changes: the table only lists versions tested against this release, and adding one means testing it, which the table's doc comment says.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

make test passes, with new ClusterSupportedVersionsTests and ClusterCreateKubernetesVersionTests. On macOS 27.3, --kubernetes-version 1.37, 1.36 and 1.35 each created a cluster whose node was Ready on that version and ran a pod. An unsupported version and the two flags together both fail with clear messages, and --node-image docker.io/kindest/node:v1.34.11 creates the cluster with a warning that it isn't a supported version. make integration passes (409 tests), including all seven cluster suites.

Not done yet: a CI smoke test per supported version. Which trigger would you want for it (#2508)?

Kubernetes 1.35 reaches end of life on 2027-02-28. Move the default to
kindest/node:v1.37.0 from kind v0.33.0, pinned by digest, and the
integration-test warmup image with it.

The --node-image docs example and the "no tag" error message used
v1.34.11, which reached end of life on 2026-10-27; use supported tags.
Add a table of supported Kubernetes minor versions, newest first, each with
a kind node image pinned by digest (kind v0.33.0: 1.37.0, 1.36.4, 1.35.8).
The first entry is the default. docs/cluster.md lists the same table, and a
test keeps the two in sync.
--kubernetes-version <minor> (e.g. 1.36 or v1.36) picks that version's
pinned node image from the supported table. It can't be combined with
--node-image; an unsupported version fails with the supported list. A
--node-image outside the table still works, with a warning.
@jglogan

jglogan commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@katiewasnothere One thought on testing - cluster tests take a lot of time today so before we add a lot more tests we need to consider how to keep build times from getting out of control. Some possibilities:

  • Cluster startup time optimizations
  • Are we including the kind image in our image preload test phase? Not sure how much this will help right now since the tests run serially.
  • Putting tests in a parallel suite - how well we could do here depends on system RAM
  • Breaking tests into distinct make targets that can run on separate build systems

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants