<@ULVA73B9P> since upgrading to 3.4.22 all my kube...
# ask-marvin
a
@Marvin since upgrading to 3.4.22 all my kube runs are stuck in PENDING, do you know why
m
thought for 242.6 seconds
Thanks for flagging this — that’s frustrating. Short answer: I’m not aware of a known regression in Prefect 3.4.22 that would make Kubernetes runs/pods get stuck Pending. The 3.4.22 notes only include a couple of fixes and no k8s changes. Full changelog: 3.4.21 → 3.4.22 To help pinpoint the cause, a quick triage checklist: 1) Confirm your worker is online and polling - In the UI, open your work pool and check that a Kubernetes worker is heartbeating - Or run:
Copy code
prefect 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:
Copy code
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.:
Copy code
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:
Copy code
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.
a
@Marvin i actually upgraded from 3.1.4. No pods are created and the workpool is active
m
thought for 193.1 seconds
Got it — thanks for the details. If your work pool is active but no pods are created after upgrading from 3.1.4 to 3.4.22, the most common culprit is that the worker can’t submit to Kubernetes (errors at submission time), typically because the Kubernetes integration isn’t installed in the worker environment after the upgrade. Quick checks and likely fix: 1) Verify the pool type and template - Ensure the pool is actually a Kubernetes work pool and has a valid base job template/variables:
Copy code
prefect 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`:
Copy code
pip show kubernetes
python -c "import prefect_kubernetes, kubernetes; print('ok')"
- If not present, install and restart the worker:
Copy code
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:
Copy code
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).