Skip to content

Conversation

@bnallapeta
Copy link
Contributor

What this PR does / why we need it:

On Apple Silicon Macs, kind load docker-image fails for multi-arch images (like cert-manager) because Docker Desktop only stores the arm64 layers locally. This causes ctr to fail when it tries to import all architectures, resulting in a "content digest not found" error that blocks tilt up.
This PR updates tilt-prepare to skip the preloading step specifically on darwin/arm64. Instead of preloading, we rely on the Kubelet to pull the images on-demand when the pods start. This bypasses the kind/docker import issue and allows the development environment to start correctly.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #13142
Refs: kubernetes-sigs/kind#3795

/area devtools

@k8s-ci-robot k8s-ci-robot added the area/devtools Issues or PRs related to devtools label Dec 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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 Dec 11, 2025
@chrischdi
Copy link
Member

What this PR does / why we need it:

On Apple Silicon Macs, kind load docker-image fails for multi-arch images (like cert-manager) because Docker Desktop only stores the arm64 layers locally. This causes ctr to fail when it tries to import all architectures, resulting in a "content digest not found" error that blocks tilt up. This PR updates tilt-prepare to skip the preloading step specifically on darwin/arm64. Instead of preloading, we rely on the Kubelet to pull the images on-demand when the pods start. This bypasses the kind/docker import issue and allows the development environment to start correctly.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #13142 Refs: kubernetes-sigs/kind#3795

/area devtools

Note: this issue is also relevant when using docker community edition >= version 29 for any OS.

I think the workaround used in CI should work here too: using crane pull "$image" "image.tar" to pull the image and docker load -i "image.tar" to load it.

Afterwards preload work.

@bnallapeta
Copy link
Contributor Author

What this PR does / why we need it:
On Apple Silicon Macs, kind load docker-image fails for multi-arch images (like cert-manager) because Docker Desktop only stores the arm64 layers locally. This causes ctr to fail when it tries to import all architectures, resulting in a "content digest not found" error that blocks tilt up. This PR updates tilt-prepare to skip the preloading step specifically on darwin/arm64. Instead of preloading, we rely on the Kubelet to pull the images on-demand when the pods start. This bypasses the kind/docker import issue and allows the development environment to start correctly.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #13142 Refs: kubernetes-sigs/kind#3795
/area devtools

Note: this issue is also relevant when using docker community edition >= version 29 for any OS.

I think the workaround used in CI should work here too: using crane pull "$image" "image.tar" to pull the image and docker load -i "image.tar" to load it.

Afterwards preload work.

Although crane would work, I am trying to avoid any dependencies for the user. Not everybody knows/uses crane in their local.
Secondly, even if we were to automate this, right now, crane isn't a tool in the tilt up workflow unlike the CI workflow.

That's why I chose the skipping way since that's probably the simplest and most straight forward. It just relies on the standard way of kubelet pulling images.

@chrischdi
Copy link
Member

The thing is this does not exclusively fail for runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" , it can also fail for any variant of running against docker. So with that arguing we could say "we should remove it for all".

The issue here is not >how we load the images< (which is part of the tooling) it is >how we pull the images<.

I'd favor a toggle-able option to disable it if needed. Long-term this should work.

@bnallapeta
Copy link
Contributor Author

@chrischdi Got it. I have now updated the PR so that users could provide a flag in tilt-settings.yaml. PTAL.

@bnallapeta bnallapeta changed the title 🐛 tilt-prepare: skip image preloading on Apple Silicon 🐛 tilt-prepare: skip image preloading based on a flag in title-settings Dec 12, 2025
@bnallapeta bnallapeta changed the title 🐛 tilt-prepare: skip image preloading based on a flag in title-settings ✨ tilt-prepare: add a flag to skip image preloading Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devtools Issues or PRs related to devtools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

tilt-prepare: "kind load" fails for docker >= version 29

3 participants