In Prefect 3.x, when using a Kubernetes worker, the worker itself should have the necessary access and permissions to create jobs within the cluster. This means that the jobs created by the worker typically do not need direct access to the Kubernetes API, as the worker handles the necessary interactions with Kubernetes.
For more details on deploying Kubernetes workers, refer to the
Prefect 3.x documentation.
Additionally, note that in Prefect 3.x, agents have been replaced by workers, and work pools have replaced infrastructure blocks. This change is part of the broader updates from Prefect 2.x to 3.x.