devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Add image import for K3D clusters

Open yashgorana opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

At the moment, devspace allows us to build and load image directly into a kind cluster. For other clusters, such as k3d, we have to use a local registry which is incredibly slow for large images due to the nature of docker push. On Apple Silicon+macOS sometimes push stage is just stuck and devspace is never able to deploy.

Turns out k3d supports loading images just like kind - https://k3d.io/v5.6.3/usage/commands/k3d_image_import/

Which solution do you suggest?

  • Devspace can auto-detect k3d cluster, and load the images using k3d image import CLI.
  • For detection, k3d clusters are always prefixed with k3d- so it works exactly like kubectl.GetKindContext()
  • The rest is hooking up the detection and running the CLI command in the builders, like it is done for kind

Which alternative solutions exist? Unsure

Additional context

  • Registry used over here is k3d managed registry, and not devspace local registry.

yashgorana avatar Apr 22 '24 06:04 yashgorana