diff --git a/docs/integrations/prefect-kubernetes/index.mdx b/docs/integrations/prefect-kubernetes/index.mdx index 715473b70ec2..0918f4874c49 100644 --- a/docs/integrations/prefect-kubernetes/index.mdx +++ b/docs/integrations/prefect-kubernetes/index.mdx @@ -71,8 +71,7 @@ if __name__ == "__main__": ```python # with minikube / docker desktop & a valid ~/.kube/config this should ~just work~ -from prefect.blocks.kubernetes import KubernetesClusterConfig -from prefect_kubernetes.credentials import KubernetesCredentials +from prefect_kubernetes.credentials import KubernetesCredentials, KubernetesClusterConfig k8s_config = KubernetesClusterConfig.from_file('~/.kube/config') diff --git a/src/integrations/prefect-kubernetes/README.md b/src/integrations/prefect-kubernetes/README.md index b1b7cd58ca9a..4054a6acc48e 100644 --- a/src/integrations/prefect-kubernetes/README.md +++ b/src/integrations/prefect-kubernetes/README.md @@ -81,8 +81,7 @@ if __name__ == "__main__": ```python # with minikube / docker desktop & a valid ~/.kube/config this should ~just work~ -from prefect.blocks.kubernetes import KubernetesClusterConfig -from prefect_kubernetes.credentials import KubernetesCredentials +from prefect_kubernetes.credentials import KubernetesCredentials, KubernetesClusterConfig k8s_config = KubernetesClusterConfig.from_file('~/.kube/config') diff --git a/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py b/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py index 6f9474c7492b..abb2973260ec 100644 --- a/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py +++ b/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py @@ -121,7 +121,6 @@ from typing_extensions import Literal, Self import prefect -from prefect.blocks.kubernetes import KubernetesClusterConfig from prefect.exceptions import ( InfrastructureError, InfrastructureNotAvailable, @@ -140,6 +139,7 @@ BaseWorker, BaseWorkerResult, ) +from prefect_kubernetes.credentials import KubernetesClusterConfig from prefect_kubernetes.events import KubernetesEventsReplicator from prefect_kubernetes.utilities import ( _slugify_label_key,