Yes, it is possible to run a Prefect Server on Kubernetes while having Prefect workers outside of the Kubernetes cluster, such as on local GPU machines. Here's a brief outline of how you can set this up:
1.
Prefect Server on Kubernetes: You can self-host a Prefect Server instance on Kubernetes using the Prefect Server Helm chart. This setup allows you to manage your flows with a UI and database backend. More details can be found in the
self-hosting guide.
2.
Prefect Workers on Local Machines: Prefect workers can run on different environments, including local machines. These workers are responsible for polling work pools for new runs to execute. You can start a worker using the
prefect worker start
CLI command, specifying the work pool name. This allows you to utilize local resources, like GPUs, for executing your flows. More information about worker setup is available in the
worker documentation.
By configuring your workers and server this way, you can leverage the strengths of both Kubernetes for orchestration and local machines for specialized tasks like GPU processing.