Can a Kubernetes agent running in one cluster deploy flows in another cluster? Or do we need one agent per Kubernetes/AKS cluster?
You shouldn’t think of an agent as an execution layer itself, but rather as a process deploying flows to the execution layer of your choice. With that in mind, you can have one agent process running in your first cluster and another agent process running in your second cluster.
Does it answer your question?
The agent process is implemented through the deployment of a physical agent , right? So, basically, if I need to run my flows in an AKS cluster , I need an Agent to be deployed to that cluster.
it’s not as strict as that - the agent is just a process - you could point your kubectl at your specific AKS cluster from your local computer:
kubectl config use-context your-aks-cluster
and start an agent process on your local machine:
prefect agent kubernetes start --label aksfromyourmachine
then any flow run with that label would be deployed to that AKS cluster, even though technically your agent process runs outside of that cluster