<@ULVA73B9P> I'm creating a kubernetes worker from...
# ask-marvin
m
@Marvin I'm creating a kubernetes worker from python sdk in prefect. # Works but will be deprecated soon, I need to use KubernetesWorker KubernetesJob( cluster_config = KubernetesClusterConfig.from_file("kube_config.yaml") ).publish_as_work_pool("testing_workpool") this method works but will soon be deprecated, I would like to use KubernetesWorker from the prefect_kubernetes package. the problem is that I don't see a way to specify the cluster_config if I use this method! I'm using Prefect 2.0
m
You need to migrate from the current approach to using
KubernetesWorker
from the
prefect_kubernetes
package, but you don't see a way to specify the
cluster_config
. Let's look into the Prefect 2.0 docs and relevant GitHub issues to find the best practices for configuring
KubernetesWorker
with the
cluster_config
. I'll start by searching the Prefect 2.0 docs for relevant information. It looks like the Prefect 2.0 documentation discusses the
HashableKubernetesClusterConfig
and other configuration options for
KubernetesWorker
, but the excerpts don’t provide enough detailed information on specifying
cluster_config
. I'll search GitHub issues for more details on this. I didn't find any relevant GitHub issues about specifying
cluster_config
directly using
KubernetesWorker
from the
prefect_kubernetes
package. Based on the documentation excerpts and typical practices in Prefect 2.0, you might need to adapt how you provide configurations. It's possible you'll need to adjust your approach, potentially using environment variables or alternative configuration methods that are supported by
KubernetesWorker
. Check the detailed Prefect Kubernetes Worker documentation for more information on configuring Kubernetes workers. If the documentation doesn't provide a solution, you might want to raise a question on the Prefect GitHub issues page or discuss it on the Prefect Slack channel for more specialized guidance.
m
@Marvin what protocols use the workers to pull work from the woorkpool ?
m
To help you accurately, I need to confirm your version of Prefect. Could you please let me know if you are using Prefect 2.x or 3.x? If you're unsure, please share any details you might have about your Prefect setup.