Arthur
10/08/2025, 4:19 PMMarvin
10/08/2025, 4:19 PMMarvin
10/08/2025, 4:23 PMprefect work-pool inspect "<your-pool-name>"
If no worker is connected, flow runs will sit in Prefect “Pending”.
2) Check if Kubernetes resources are actually created
- If the worker is online, see if Jobs/Pods are being created:
kubectl get jobs,pods -n <your-namespace>
3) If pods exist but are Pending, get the exact reason from events
- This will tell us if it’s Unschedulable, ErrImagePull, ImagePullBackOff, quota, etc.:
kubectl describe pod <pod-name> -n <your-namespace>
kubectl get events -n <your-namespace> --sort-by=.metadata.creationTimestamp
4) If no pods are created, check the worker logs for submission errors
- Look for errors around RBAC, missing imagePullSecrets, service account, or template rendering.
5) Sanity checks that often explain “Pending” after upgrades
- The worker container is running the kubernetes extra and can access the cluster (e.g., prefect[kubernetes] installed in the worker environment)
- Your image is pullable with the configured image_pull_secrets
- Resource requests/limits or node selectors/tolerations still match what your cluster can schedule
- The flow image update (if you bumped to a prefecthq/prefect:3.4.22-* base) didn’t introduce a policy conflict (e.g., securityContext/PSA)
Could you share:
- Whether you’re on Prefect Cloud or self-hosted
- The work pool name/type and whether the worker shows online
- Whether pods are created, and if so, the relevant lines from kubectl describe pod … (the “Events” section)
- Any worker log snippets around submission time
If you need to get unblocked immediately, you could try a quick rollback to 3.4.21 to confirm it’s version-related:
pip install "prefect==3.4.21"
But from what I can see, 3.4.22 itself doesn’t include a k8s-specific change; the describe/events output will likely reveal the root cause. Happy to dig in once you share those details.Arthur
10/08/2025, 7:51 PMMarvin
10/08/2025, 7:51 PMMarvin
10/08/2025, 7:54 PMprefect work-pool inspect "<your-pool-name>"
Share the type and any missing/required fields in the base_job_template if you see them.
2) Check worker logs when it picks up a run
- Look specifically for import or client errors like:
- ModuleNotFoundError: kubernetes or prefect_kubernetes
- RBAC/Forbidden errors
- If you can, paste a few lines around the error.
3) Ensure the worker environment has the Kubernetes integration installed
- In the environment/container running `prefect worker start`:
pip show kubernetes
python -c "import prefect_kubernetes, kubernetes; print('ok')"
- If not present, install and restart the worker:
pip install "prefect[kubernetes]==3.4.22"
This installs the prefect_kubernetes integration and the kubernetes Python client — both are required for the worker to create Jobs/Pods.
4) If pods still don’t appear after that
- Confirm the worker has permissions to create jobs/pods in your namespace (RBAC). A Forbidden error will show in worker logs.
- Double-check your deployments are pointed to the correct work pool and aren’t paused:
prefect deployment inspect "<flow-name>/<deployment-name>"
If you can share:
- Output of prefect work-pool inspect "<pool>"
- A snippet of the worker logs when it tries to submit a run
- Confirmation that prefect[kubernetes] and kubernetes are installed in the worker environment
I can pinpoint the issue quickly. For reference: workers concept docs Workers and the 3.4.21 → 3.4.22 changelog link (no k8s-specific changes noted).