I installed a dask cluster (<https://docs.prefect....
# prefect-community
b
I installed a dask cluster (https://docs.prefect.io/orchestration/recipes/k8s_dask.html#kubernetes-manifests) on our kubernetes cluster and I can run flows on it no problem using flow.run(). However, when I register the flow it tries to run the job as a kubernetes job. I have prefect server deployed and can see the runs, but they all fail with 'module C not found'. I am missing something, why do the flows not execute on the dask cluster?
a
The issue you see is related to Storage you attached to your flow. It looks like you were using Local storage and you didn't change it to remote storage (like e.g. Github or S3) when deploying the flow. The No module named 'C' is because you’re using Windows, and that is the default file drive, and the import on the Prefect end will look like “from C..prefect.flows import your-flow” Here is a more detailed answer to the same question: https://github.com/PrefectHQ/prefect/discussions/5143#discussioncomment-1632980 This Discourse topic explains it in more detail: https://discourse.prefect.io/t/when-i-run-my-flow-i-see-an-error-failed-to-load-and-exe[…]derror-no-module-named-users-username-what-is-happening/33
b
When I use the Github Storage I see evidence that it is pulling the Github Repo, but then I just get:
Copy code
Pod prefect-job-7d71a51e-dwbkj failed.
	Container 'flow' state: terminated
		Exit Code:: 1
		Reason: Error
For all pods.
When I get the logs for the failing pods I see
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: <http://prefect-server-apollo.prefect:4200/graphql>
This was an issue with environment variables inside the launching containers. I needed to remove my HTTP_PROXY environment variable, but keep the HTTPS_PROXY environment variable.
👍 2
k
Glad you figured it out!