def check_if_namespace_exists()

in src/hyperpod_cli/clients/kubernetes_client.py [0:0]


    def check_if_namespace_exists(self, namespace: str):
        try:
            client.CoreV1Api().read_namespace(name=namespace)
            return True
        except client.rest.ApiException as e:
            if e.status == 404:
                return False
            else:
                print(f"Exception when calling read_namespace: {e}")
                raise e