https://garden.io logo
#🌱|help-and-getting-started
KinD clusters
# 🌱|help-and-getting-started
p

purple-translator-44176

12/17/2022, 8:48 AM
Hi All, Looking for some advice on the approach that people have used for local Kubernetes KinD clusters. If I understand correctly, docker images that are built locally need to be uploaded into KinD using
kind load docker-image ...
. In my current setup I have added an
exec
module that does this and depends on the
container
module to get the image name to load. It works, but it feels messy. So, what are others doing? Is it possible to use the in-cluster registry with KinD and get garden to publish the images? I want to support both Docker Desktop (default) and KinD (multi-node testing) so if using the in-cluster registry is a viable option (for KinD) I would only want to configure this for KinD ... not sure how to accomplish that when there is only a single
local-kubernetes
provider configuration. Any thoughts and advice would be much appreciated. Thanks, Si
q

quaint-dress-831

12/21/2022, 8:34 AM
Hi Simon, the in-cluster registry is slated for removal in a near release. With local clusters you're generally building and storing these images locally in the local filesystem so I'd be curious what using an in-cluster registry for local clusters would get you. With remote clusters, users generally prefer to use full-powered registries like GitHub Container Registry. If you're looking for a free, private registry, you may be interested in canister.io.
p

purple-translator-44176

12/21/2022, 3:47 PM
Hi, KinD (and Minikube?) require an additional 'load' step after building the images locally. In the case of KinD the command
kind load docker-image <image name>
must be run before the image can be used. That makes it a bit of pain to use, unless I am missing something obvious. I thought perhaps using a registry deployed in the KinD cluster might streamline this, but if in-cluster is going away then I'll avoid that. https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster One option is to define an
exec
module that runs the load command and that depends on the
container
module that builds the image - this can be templated. But, it all feels a little bit messy and complex. Docker desktop is much more streamlined but there is no multinode support at the moment. I guess others might be doing their multinode testing on remote clusters.
q

quaint-dress-831

12/22/2022, 12:07 PM
I think this might end up being a feature request but before I test kind with Garden (don't worry I'll be happy to submit the feature request myself once I've confirmed), can you give Rancher Desktop with k3d a shot (https://docs.rancherdesktop.io/how-to-guides/create-multi-node-cluster/) and/or a highly available MicroK8s cluster (https://ubuntu.com/tutorials/getting-started-with-kubernetes-ha#1-overview) ?
t

tall-greece-98310

01/20/2023, 9:35 AM
I don't quite follow why you @purple-translator-44176 need an extra step to load images. I've got kind cluster setups with no other settings than this and it works out of the box:
a simple module like this to build an image works well and can be used in the cluster as expected.
q

quaint-dress-831

01/23/2023, 1:43 PM
@tall-greece-98310 I was a bit curious too why Kind needed extra fiddling. @purple-translator-44176 let us know if your issue has been solved or if you've discovered the culprit 🦢
6 Views