Don't suppose anyone is running a `prefect agent k...
# ask-community
c
Don't suppose anyone is running a
prefect agent kubernetes
in a custom Docker Image? I can get my image running on AWS Fargate with:
Copy code
command=[
    "prefect",
    "agent",
    "ecs",
    "start",
    "--agent-address",
    "http://:8080",
    "--cluster",
    cluster.cluster_arn,
    "--task-role-arn",
    ecs_task_role.role_arn,
],
But on AKS it's a whole different story, I can't get it running 😭 Essentially it can't find prefect but I can run the container locally and invoke prefect
k
Hey @ciaran, like the prefect CLI is not there? I feel like we’ve had users running the agent in images (more threads like this are in the server channel).
c
If I run:
It's definitely in the image
But AKS/K8s is doing something not obvious with what shell the container uses 🎢
z
are you using a custom entrypoint?
c
I don't believe so, we're building this ontop of a pangeo image. But the AWS one is working so I'd be curious to see if the entrypoint is actually changing how this works.
Hmmm, further playing around and
Copy code
- command: ["/srv/conda/envs/notebook/bin/prefect", "agent", "kubernetes", "start"]
Works. But: • AWS doesn't need this • Doing this ties my config to the image
z
Do you install it with conda both places?
c
Yep, it's the same image they're running
z
¯\_(ツ)_/¯
I ran into something similar with jobs, but it was just because my entry point wasn’t quite right
c
Yeah, it's a weird one. I'm having to do some much more work around for something AWS was just
prefect X
🎢
So, finally figured this out, mainly down to my missunderstanding of k8s
command
is the k8s equivalent of
ENTRYPOINT
So really I didn't need
command
at all
and just pass my
prefect
command as a
,
separated list in
args
z
ah cool, i figured it was somehow related to the entrypoint
glad you figured it out!
🙌 1
c
Thanks for coming to my TED Talk
😂 1