From e789d31993d22dac00ff49c727404852021cbf38 Mon Sep 17 00:00:00 2001 From: Hannes Probst Date: Tue, 26 Sep 2023 12:03:56 +0200 Subject: [PATCH] Improve kkp-cluster helper by setting a meaningful context in the temporary kubeconfig. Signed-off-by: Hannes Probst --- fubectl.source | 1 + 1 file changed, 1 insertion(+) diff --git a/fubectl.source b/fubectl.source index bf8316c..feb5e51 100755 --- a/fubectl.source +++ b/fubectl.source @@ -421,6 +421,7 @@ function kkp-cluster() { TMP_KUBECONFIG=$(mktemp) local cluster="$(kubectl get cluster | _inline_fzf | awk '{print $1}')" kubectl get secret admin-kubeconfig -n cluster-$cluster -o go-template='{{ index .data "kubeconfig" | base64decode }}' > $TMP_KUBECONFIG + kubectl --kubeconfig $TMP_KUBECONFIG config rename-context default cluster-$cluster KUBECONFIG=$TMP_KUBECONFIG $SHELL }