Patrick Alves
11/22/2024, 3:44 PMKubernetesClusterConfig
and KubernetesJob
using prefect_kubernetes
.
But when I try to create the work pool using:
from prefect_kubernetes.jobs import KubernetesJob
# prefect.infrastructure:KubernetesJob has been removed
KubernetesJob.load("k8s-job").publish_as_work_pool()
I've got:
AttributeError: 'KubernetesJob' object has no attribute 'publish_as_work_pool'
I am following: https://docs.prefect.io/3.0/resources/upgrade-agents-to-workers
Prefect versions:
prefect-kubernetes = "^0.5.3"
prefect = "3.1.2"
Any tips?Nate
11/22/2024, 3:53 PMprefect_kubernetes.jobs.KubernetesJob
is not an infra block like prefect.infrastructure.KubernetesJob
so you'd have to use the latter which is an infra block and has that publish_as_work_pool methodNate
11/22/2024, 3:54 PMPatrick Alves
11/22/2024, 3:55 PMNate
11/22/2024, 3:56 PMPatrick Alves
11/22/2024, 3:57 PMPatrick Alves
11/25/2024, 1:35 PMNate
11/25/2024, 2:41 PMKubernetesJob
infrastructure block but we've deprecated that deployment paradigm in favor of work pools and workers (which should be valid in recent releases of 2.x and all 3.x versions)Patrick Alves
11/25/2024, 2:42 PMNate
11/25/2024, 2:46 PM