Skip to content

Commit

Permalink
refactor(zsh): pass a single kubeconfig in KUBECONFIG var
Browse files Browse the repository at this point in the history
due to an issue with
kubectx (ahmetb/kubectx#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
  • Loading branch information
Christian Avgulas committed Dec 1, 2023
1 parent b3babe2 commit 69d5077
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zsh/zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 69d5077

Please sign in to comment.