b
I'm having some trouble figuring out how garden builds interact with docker registries. I'm trying to develop entirely locally for the moment. Whether I use local-docker or cluster-buildkit, my deploys fail with "Error response from daemon: pull access denied for image, repository does not exist or may require 'docker login'", which doesn't seem right. The images in question do visibly exist as far as my host docker daemon is concerned. What do I need to do for garden to be able to deploy them?
I tried setting deploymentRegistry: hostname: localhost port: 5000 insecure: true in my provider but this doesn't seem to have helped, it's still using an unqualified image name in the deployment and at a guess it's trying to pull from docker.io. How can I confirm that? How can I change that?
I am realising garden may be trying to use an internal cluster registry instead, except it doesn't exist. I've ran garden plugins local-kubernetes cluster-init in my local environment, but that hasn't made it exist. It put a configmap and a serviceaccount in my garden-system namespace, but nothing else. What am I missing? I do not have a deploymentRegistry defined, and I have tried this with a completely blank environment several times.
b
Hey @blue-kite-93685 I’m so sorry you are getting this issues, let’s try to find the root cause for this one! Would you mind sharing the project configuration you have for this deployment? Thank you!🌸
b
b
please let me give it a quick test if you don't mind!
I'm going to add a quick dockerfile that bootstrap a react application to test this one! Will update in a couple of minutes.
b
the cluster-init output doesn't really seem to suggest it's trying to create an in-cluster registry
b
Sorry one more question, to run docker are you currently using
docker-desktop
?
b
Yep
Rancher-desktop is providing a k3s cluster with docker desktop as the container engine
I can't work out what the intended behaviour is meant to be to be honest. What does local-docker use by default to get images to the cluster? I'm slightly surprised it needs to pull anything per se
b
Do you mind checking if you are using dockerd for rancher k3s?
b
b
do you mind doing a
garden delete environment
and
rm -fr .garden
b
I've been doing that all day ;p suresure.
b
And remove the
buildMode: local-docker
and then deploy again
b
oh. just no buildmode? haven't tried that
b
Yes please try that, usually when I'm local I don't have to set that up and it works, maybe try doing the cleanup and then deploy without that!
b
nm, didn't do that quite right (taking a lil while to take the env down, bear with me.)
b
no worries! I'm here!
b
mmyeah. much the same.
b
can you please do
cat ~/.docker/config.json
b
not much of interest set up - what're you looking for? I'm on windows, so it's using the windows crential store
there's no entry for e.g. an in-cluster registry if that's the idea
b
I was trying to see if maybe there is a misconfiguration of the registries, it seems like yours is trying to go directly to docker hub instead of locally. Have you tried
kaniko
as buildMode? When you set that one Garden deploys a registry for you in the cluster. I'm currently checking into that option with my local environment
b
Pulling unqualified names from docker.io is default behaviour afaik
b
I was able to reproduce the issue you are having but to be fair I have a really conflicted installation of Docker atm as I installed docker-desktop but also have docker running at the system level in Linux
b
heh
I have not played with kaniko yet, I'll give that a try. I did try cluster buildkit, which didn't seem to change much, but I'm not sure I gave it an adequate reset
b
yeah when resetting the stuff try to always delete the metadata, I'm currently testing kaniko, It seems like it installed the registry in the cluster locally successfully.
b
I ran the self-update along the way and now it's just giving me
Path C:\Users\<user>\.garden\bin\static is not in a git repository root.
while my cwd is definitely that of my project. 🙃
b
I'm so sorry that this is being to painful, I don't have a lot of experience with Windows, but maybe the self-update command did not properly installed the new binary?
b
replaced with the backup. crisis averted..
b
Hey good news, Kaniko ended up working for me. I just followed the steps: 1.
garden delete environment
2.
rm -fr .garden
3. Change buildMode to
kaniko
4.
garden deploy
5. You can open a different terminal and some pods should be created "garden-registry-proxy, garden-docker-registry, etc
do you mind trying the above?
b
yepyep
b
I can upload my whole project if you want to take a look?
b
🎉 All green
Thanks a bunch for your help 😛
b
No worries! I hope the best for your project and thanks for using Garden! 🌸
q
@blue-kite-93685 with 0.13.13 we now ship first-class support for Rancher Desktop 🥂
18 Views