Mikaël Ferreira de Almeida
08/28/2023, 3:24 PMk8s_jb = KubernetesJob(
...
namespace="prefect",
)
After saving the block I can see in the UI that the namespace is correctly defined.
But sometimes, when I run a deployment flow, I get these errors:
TTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"jobs.batch is forbidden: User \"system:serviceaccount:prefect:prefect-worker\" cannot create resource \"jobs\" in API group \"batch\" in the namespace \"default\"","reason":"Forbidden","details":{"group":"batch","kind":"jobs"},"code":403}
The error message indicates that I'm in the wrong namespace. If I use the "Retry" button, at some point it will be executed in the "prefect" namespace.
Sometimes I don't get the error, sometimes I have to retry 5 times.
Does anyone have the same problem?John Kang
08/28/2023, 8:42 PMMikaël Ferreira de Almeida
08/29/2023, 7:50 AMChristopher Boyd
09/01/2023, 12:08 AMMikaël Ferreira de Almeida
09/01/2023, 7:40 AMDeployment.build_from_flow(
, i should not specify the "infra" parameter if I already said that the deployment is on a work_pool ?Christopher Boyd
09/01/2023, 12:23 PM