In the Waypoint tutorial there’s the waypoint up
step.
The description at this point says
For this example application, Waypoint will store the image in a remote > Docker repository after the application is built.
However the .hcl
file says local = true
and I have exactly this problem, my the Pod that is created by the Waypoint server/runner can’t pull the Docker image I have in my local registry.
My questions:
- Shouldn’t it be
local = false
?
- Is there any way for my Kubernetes cluster to access my local Docker registry at all if using
local = true
is the way to go?
- I have tried
waypoint up -local=false
which barks at me to configure a Git repo for the project, which I do in the UI, but then I don’t understand what/which command should I run on my local machine from the nodejs example’s Git repo’s root to make things work? Even if I configure Git settings in the UI waypoint up
or waypoint up -local=false
don’t work
Thanks for any pointers.
If it helps, my setup consists of
- my laptop where I have Waypoint installed
- I’m running a 3 node Kubernetes cluster inside VMs
- I run Docker in a VM also (Docker Toolbox)
- installed Waypoint from my laptop/host machine targeting my Kubernetes cluster (everything works, web UI, login, etc.)
- I’m checking out the nodejs example repo with the
.hcl
on my local machine
- I’m then running
waypoint up
and everything works, but at the end my Pod can’t access/pull the image
Hey there @kohanyi.robert ! I’ll try to answer all of your questions here…
- Shouldn’t it be
local = false
?
This depends on your setup. In the Learn guide, the Kubernetes implementations that recommend local = true
are for Docker Desktop. In this case, DD’s implementation of Kubernetes comes with a built in container registry. So local = true
is correct for the tutorial. In reality, you will likely be pushing your container else where as running Kubernetes on its own (say on linux) you don’t get a container registry for free.
- Is there any way for my Kubernetes cluster to access my local Docker registry at all if using
local = true
is the way to go?
If you’re using Docker Desktop yes, but it sounds like you aren’t. You’ll want to use a container registry with local = false
, and make sure your Kubernetes cluster can access the registry and pull from it. You can also push to a “real” container registry such as Quay or Artifactory which is a more likely scenario.
- I have tried
waypoint up -local=false
which barks at me to configure a Git repo for the project, which I do in the UI, but then I don’t understand what/which command should I run on my local machine from the nodejs example’s Git repo’s root to make things work ? Even if I configure Git settings in the UI waypoint up
or waypoint up -local=false
don’t work
The flag -local
on waypoint up
refers to runner locality:
-local
True to use a local runner to execute the operation, false to use a
remote runner. If unset, Waypoint will automatically determine where the
operation will occur, defaulting to remote if possible.
This means Waypoint will run the Up operation remotely on a runner in your system. For just working with the tutorial and trying a Waypoint project locally, you wouldn’t want to set this flat to true when running waypoint up
.
Hope this helps!
DD’s implementation of Kubernetes comes with a built in container registry
I see. I’m not a Docker Desktop user, that’s a new one (didn’t know it comes with a bundled Kubernetes and top of that a built-in registry).
Kubernetes on its own (say on linux) you don’t get a container registry for free.
Yep, that’s cool!
Is there any way for my Kubernetes cluster to access my local Docker registry at all
If you’re using Docker Desktop yes, but it sounds like you aren’t. You’ll want to use a container registry with local = false
, and make sure your Kubernetes cluster can access the registry and pull from it.
Yes, thanks I got it, this is crystal clear now.
You can also push to a “real” container registry such as Quay or Artifactory which is a more likely scenario.
Well, for me it’s not, private registry is what I use most often at work, not a problem with that.
So, I think I now filled in some missing pieces, but I have still one or two questions, because I still don’t get -local=<false|true>
completely.
- Let’s say I have a Kubernetes cluster with a registry available to the cluster.
- I clone the example repo on my workstation/laptop which have access to the cluster (via a shared Kubernetes config) - this a Windows machine btw. and it has Waypoint installed.
- At this point what I want to achieve is run
waypoint up
inside the repo’s root (or without -local=false
if necessary) and run the Docker build phase and everything else on the cluster (I don’t want to configure/give Waypoint Git repo access)
- Is this doable?
- Is what I want to do falls into Waypoint’s scope at all?
I would image that in this case I would need to use the -local=false
flag (the Docker registry could still be configure as local = true
since it’s local to Kubernetes in this case in my reading). However based on my previous experience in this case the .hcl
file must contain Git repo URL/credentials, etc. what I want to avoid (not because I’m against it or anything - this is what I wanted to do, but failed to do so).
I don’t want to go against how the tool is supposed to be used, just want to understand it a bit better.
Thank you for your answer(s) and your time. Really appreciate it. Let me know if these are too far fetched questions, not a problem. 