From 69d507702bf0cc8392232236d305dc6ac48e2c16 Mon Sep 17 00:00:00 2001 From: Christian Avgulas Date: Fri, 1 Dec 2023 10:50:35 +0100 Subject: [PATCH] refactor(zsh): pass a single kubeconfig in KUBECONFIG var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit due to an issue with kubectx (https://github.com/ahmetb/kubectx/issues/211) I need to switch to a single kubeconfig keeping multiple kubeconfig collection … will need it when a new config is added … in this case: - add new kubeconfig to ~/.kube - switch to the multi-config KUBECONFIG and apply - run `kubectl config view --flatten > ~/.kube/config` - change back to the single-config KUBECONFIG and apply --- zsh/zshenv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zsh/zshenv b/zsh/zshenv index f21a1d9..d4db664 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -10,6 +10,8 @@ if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then source "${ZDOTDIR:-$HOME}/.zprofile" fi -export KUBECONFIG=/home/avgulas/.kube/tset_nucost_develop:/home/avgulas/.kube/tset_nucost_production:/home/avgulas/.kube/tset_nucost_kion:/home/avgulas/.kube/tset_nucost_tc:/home/avgulas/.kube/tset_nucost_zf:/home/avgulas/.kube/tset_ops_orbitals:/home/avgulas/.kube/tset_deadpool:/home/avgulas/.kube/tset_paradise:/home/avgulas/.kube/tset_hulk:/home/avgulas/.kube/tset_punisher:/home/avgulas/.kube/tset_develop:/home/avgulas/.kube/tset_production:/home/avgulas/.kube/tset_zf:/home/avgulas/.kube/tset_tc +# export KUBECONFIG=/home/avgulas/.kube/tset_ops_orbitals:/home/avgulas/.kube/tset_punisher:/home/avgulas/.kube/tset_develop:/home/avgulas/.kube/tset_production:/home/avgulas/.kube/tset_zf:/home/avgulas/.kube/tset_tc:/home/avgulas/.kube/tset_bmw + +export KUBCONFIG=/home/avgulas/.kube/config source /mnt/data/vault/onepassword/op.env