From 8822dee3582241250ac28eefc27445fd13cc5ac9 Mon Sep 17 00:00:00 2001 From: Romil Bhardwaj Date: Sun, 18 Aug 2024 21:19:28 -0700 Subject: [PATCH] fix --- sky/provision/kubernetes/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sky/provision/kubernetes/utils.py b/sky/provision/kubernetes/utils.py index 0414d8f7f47..3f7d9c9f736 100644 --- a/sky/provision/kubernetes/utils.py +++ b/sky/provision/kubernetes/utils.py @@ -1730,6 +1730,9 @@ def is_inside_kubernetes() -> bool: def is_kind_cluster() -> bool: """Returns whether the caller is running on or in a local KinD cluster""" + k8s_enabled, _ = check_credentials() + if not k8s_enabled: + return False curr_kube_config = get_current_kube_config_context_name() if curr_kube_config is None: # If kubeconfig is not present, we could be inside a KinD cluster