Hi, I’m using a Prefect Kubernetes worker, and whe...
# ask-community
a
Hi, I’m using a Prefect Kubernetes worker, and when it tries to create a Kubernetes Job I get this error:
Copy code
Forbidden: jobs.batch is forbidden: User "system:serviceaccount:prefect:prefect-worker" cannot create resource "jobs" in API group "batch" in the namespace "default"
It seems the service account
prefect-worker
in namespace
prefect
doesn’t have permission to create Jobs in
default
. any solutions?
l
its exactly as it says. default is kubernetes default namespace. You most likely trying to deploy to your custom namespace like my-prefect or smth. You need to give prefect-worker permissions to do that, to use your namespace, ideally read about helm charts etc how to use it, how create baseJobTemplate etc.
k
the namespace the worker tries to create jobs in is configurable on the work pool's Edit page in the UI
since our helm chart creates the
prefect
namespace and places all the resources there, you'll want to set the namespace config for the work pool to
prefect
also
a
ok its clear now thanks guys, but rightnow i get new error, i will create new thread then