Is it possible to have a Kubernetes Agent run a F...
# prefect-community
Is it possible to have a Kubernetes Agent run a Flow in a different namespace? Can this be set via the job template? (In 1.0)
you can pass the namespace into the runner e.g flow_runner=KubernetesFlowRunner( namespace="prefect",
🙌 2
Is this in Orion? I can't find it in the docs.
yep orion
i had to dig into the source for the available param
Okay, we need a solution for 1.0
aha ok sorry
i have only used 2.0
available in 1
afaik it is not - but you can easily deploy a second agent process in this second namespace:
Copy code
prefect agent kubernetes start --namespace my-namespace
don't forget that agent is a lightweight process rather than an entire execution layer
I believe the reason for that is more related to Kubernetes permissions rather than Prefect agent limitations - it would be difficult to deploy flow run pods from a process running in one Kubernetes namespace to the other namespace because this process has by default no access to that other Kubernetes namespace
(I'm no Kubernetes admin though - you may ask on Kubernetes discourse to be sure)
Okay. We thought the overhead of monitoring and deploying a separate agent is still considerably high, hence the question. I‘m also not sure at all about the Kubernetes rights, however would have thought that with the right service account it should be possible.
👍 1