kube-tmux icon indicating copy to clipboard operation
kube-tmux copied to clipboard

How can I dynamically set the context

Open tao12345666333 opened this issue 5 years ago • 3 comments

I have multiple clusters.

I can connect each other by seting KUBECONFIG environment variable.

The script can get correct output, like this:

(MoeLove) ➜  ~ echo $KUBECONFIG
/home/tao/.kube/kind-config-1
(MoeLove) ➜  ~ sh ~/workspace/kube-tmux/kube.tmux 
#[fg=blue]⎈ #[fg=colour]#[fg=]kubernetes-admin@kind-1#[fg=colour250]:#[fg=]default
(MoeLove) ➜  ~ KUBECONFIG=/home/tao/.kube/config 
(MoeLove) ➜  ~ sh ~/workspace/kube-tmux/kube.tmux 
#[fg=blue]⎈ #[fg=colour]#[fg=]minikube#[fg=colour250]:#[fg=]default

But the tmux status bar can not get correct result. I know that it did not get the correct environment variable when it executed. And I want to know how can I do this?
Thanks!

tao12345666333 avatar Dec 11 '18 03:12 tao12345666333