Hey everyone, I'm trying to set up a prefect work...
# ask-community
a
Hey everyone, I'm trying to set up a prefect worker with helm on my VPC, and getting an error with the very basic initial set-up. Wondering if someone has any pointers? i really just followed the getting started guide from Helm Prefect Worker. The worker is laucnhed fine, but as soon as a flow run is received to process it fails. Error Info:
Copy code
16:43:30.481 | INFO    | prefect.flow_runs.worker - Creating Kubernetes job...
16:43:30.547 | INFO    | prefect.flow_runs.worker - Job 'notorious-pillbug-zf7c7': Starting watch for pod start...
16:43:30.565 | ERROR   | prefect.flow_runs.worker - An error occurred while monitoring flow run 'b8f46f0d-0a09-4cf5-870c-cb3936b4ccee'. The flow run will not be marked as failed, but an issue may have occurred.

(...)

kubernetes_asyncio.client.exceptions.ApiException: (403)
Reason: Forbidden: pods is forbidden: User "system:serviceaccount:prefect:prefect-worker" cannot watch resource "pods" in API group "" in the namespace "default"
It seems the worker is attempting some sort of interaction with the "default" namespace which is weird, since I followed the guide recommendation to set everything on a new namespace
prefect
. Anyways, there's some error during the setup and and the worker never even starts running the flow. • Helm version
v3.12.2
• Prefect Worker Chart App Version
3.0.9
šŸ”’ 1
āœ… 1
values.yaml
Copy code
namespaceOverride: prefect
worker:
  cloudApiConfig:
    accountId: ***
    workspaceId: ***
  config:
    workPool: ***
n
hi @Andre Cavalheiro - if you look at your k8s work pool, whether via CLI
prefect work-pool inspect <your-pool>
or in the UI, which namespace is your work pool configured to run jobs in?
a
facepalm
thank you so much man, I wasn't aware you needed to configure that in the worker pool itself.
n
no worries! we should make that more clear in the guide i asked because others have done the same thing before šŸ™‚
šŸ™‡ 1
PR to clarify!
šŸ‘‘ 1
ā¤ļø 1
šŸ™Œ 1
a
Daaamn! Nice!!
catjam 1