From 659474889b5da181e1f7ce6fe638575c0ddc2d2d Mon Sep 17 00:00:00 2001 From: franknstyle Date: Thu, 18 May 2023 09:12:11 +1000 Subject: [PATCH] use label for bastion discovery --- k8s/bastion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/bastion.go b/k8s/bastion.go index 75043d78..ca522df4 100644 --- a/k8s/bastion.go +++ b/k8s/bastion.go @@ -12,7 +12,7 @@ func FetchBastionIpAddress(clusterName, namespace, kubeConfigPath string) (strin namespace = "default" } p := gexe.RunProc(fmt.Sprintf( - `kubectl get awscluster/%s -o jsonpath='{.status.bastion.publicIp}' --namespace %s --kubeconfig %s`, + `kubectl get awscluster -l cluster.x-k8s.io/cluster-name=%s -o jsonpath='{.status.bastion.publicIp}' --namespace %s --kubeconfig %s`, clusterName, namespace, kubeConfigPath,