Skip to content

Switch to using kind build node-image for e2e tests#11251

Open
kannon92 wants to merge 1 commit into
kubernetes-sigs:mainfrom
kannon92:issue-11249-kind-node-images
Open

Switch to using kind build node-image for e2e tests#11251
kannon92 wants to merge 1 commit into
kubernetes-sigs:mainfrom
kannon92:issue-11249-kind-node-images

Conversation

@kannon92
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind cleanup
/area testing

What this PR does / why we need it:

Switches e2e tests to build kind node images locally from K8s release
artifacts instead of pulling pre-built kindest/node images from
Docker Hub.

This adds a build_kind_node_image function in e2e-common.sh that
runs kind build node-image v<version> before cluster creation. The
command downloads release tarballs (does not compile K8s from source),
so the cost is comparable to pulling the pre-built image.

Behavior:

  • Non-standard images (e.g. k8s-main:latest) are skipped since they
    have their own build targets
  • In dev mode (E2E_MODE=dev), the build is skipped when the image
    already exists locally

Which issue(s) this PR fixes:

Fixes #11249

Special notes for your reviewer:

The existing kind-k8s-main-image-build Makefile target is unchanged
since it builds from CI artifacts, not releases.

Does this PR introduce a user-facing change?

NONE

AI Assistance Disclosure: This pull request was created with the assistance of AI (Claude Code by Anthropic).

Instead of pulling pre-built kindest/node images from Docker Hub,
build them locally using "kind build node-image". This downloads
K8s release tarballs rather than compiling from source, so the
cost is comparable to pulling the pre-built image.

This gives kueue control over e2e testing timing without relying
on kind to publish official node images for each K8s release.

In dev mode, the build is skipped when the image already exists
locally. Non-standard images (e.g. k8s-main:latest) are also
skipped since they have their own build targets.
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/testing Testing - related stuff labels May 15, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 25b4eb6
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/6a0779bd65b663000872ecce
😎 Deploy Preview https://deploy-preview-11251--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot requested review from kshalot and mimowo May 15, 2026 19:53
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kannon92
Once this PR has been reviewed and has the lgtm label, please assign mbobrovskyi for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 15, 2026
fi

echo "Building kind node image: $E2E_KIND_VERSION (K8s v$KIND_VERSION)"
$KIND build node-image "v$KIND_VERSION" --image "$E2E_KIND_VERSION"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much longer does it take compared to just downloading it? I’m wondering if we can first check whether the image already exists, and only build it if it doesn’t.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way you have to download the base image layer (squashed) and the kubernetes binaries (Either via a node-image or via the release tarball) so it's similar.

@mimowo
Copy link
Copy Markdown
Contributor

mimowo commented May 18, 2026

/test all
checking if this doesn't introduce any flakiness on downloading the packages in a new way
try (1/5)

@mimowo
Copy link
Copy Markdown
Contributor

mimowo commented May 18, 2026

cc @BenTheElder ptal

export KIND_VERSION="${E2E_KIND_VERSION/"kindest/node:v"/}"

function build_kind_node_image {
if [[ "$E2E_KIND_VERSION" != kindest/node:v* ]]; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Labels

area/testing Testing - related stuff cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to using kind build node-images

5 participants