https://prefect.io logo
s

Scarlett King

10/06/2021, 3:25 PM
Hey, I’m trying to use Kubernetes agent locally instead of local agent. I have a customised Docker image that I built locally that I want Kubernetes to use. How do I tell the Kubernetes agent to do this? It looks like if I just pass the name of the image, the agent is saying it can’t find it.
k

Kevin Kho

10/06/2021, 3:26 PM
How are you passing it? You don’t want to pass it through the RunConfig?
s

Scarlett King

10/06/2021, 3:31 PM
I want to pass it the easiest way. Right now I’m doing
KubernetesRun(image=‘test’)
but it’s not working. ‘test’ is the name of the Docker image that I have locally on my machine
k

Kevin Kho

10/06/2021, 3:34 PM
If your Kubernetes cluster on Local too?
s

Scarlett King

10/06/2021, 3:34 PM
Yes, I’m running it locally with
prefect agent kubernetes start
The server is run with
prefect server start
k

Kevin Kho

10/06/2021, 3:39 PM
Wait but that’s the agent. I mean the actual Kubernetes cluster. Is it on a Cloud provider? or you have minikube locally?
s

Scarlett King

10/06/2021, 3:53 PM
No, I’m running everything locally. I have prefect server running in Docker the default way (
prefect server start
). For agent I just start a Kubernetes one as I mention above. In addition to that, to ensure what I’m developing locally and what will get deployed to our AKS cluster later on stay the same, I have a customised Docker image that I use to register the flows. The flow registration is working as intended with the flow stored on Azure blob storage and I can see the flow in the UI. Everything works fine when I do exactly this but using local agent. Now I want to change to Kubernetes agent and it looks like Kubernetes is looking for my customised Docker image but it doesn’t know where to find it. Is it possible to do this with my current set up?
k

Kevin Kho

10/06/2021, 3:56 PM
Ah ok. It is but you need to do something like point local kubernetes to local docker images because it goes to DockerHub by default. I saw a link one time, will try to find it
This is for minikube specifically, which is why I was asking.
s

Scarlett King

10/06/2021, 3:58 PM
I’m still new to this so not too sure if it’s minikube. I just enable the Kubernetes option on Docker Desktop basically
k

Kevin Kho

10/06/2021, 4:00 PM
Ohh that’s new to me will take a look
This looks a bit trickier cuz it’s running inside a docker container but you need to get it to point to the local daemon outside. Not quite sure how to do that.
s

Scarlett King

10/06/2021, 4:45 PM
Yeah, I’ve been trying a few things. I see what you mean. It might be easier if I just get minikube
2 Views