A tmux wrapper for managing multiple clusters and incorporating tmuxinator.
Doc: https://kubemux.corvo.fun
Blog:
- https://corvo.fun/2023/12/27/2023-12-26-kubemux%E7%9A%84%E5%BC%80%E5%8F%91%E4%B8%8E%E4%BD%BF%E7%94%A8/
- https://corvo.myseu.cn/2023/12/27/2023-12-26-kubemux%E7%9A%84%E5%BC%80%E5%8F%91%E4%B8%8E%E4%BD%BF%E7%94%A8/
Most of the code is generated by ChatGPT.
# MacOS
brew install corvofeng/tap/kubemux
# Linux -- using bin: https://github.com/marcosnils/bin
bin install https://github.com/corvofeng/kubemux ~/usr/bin
# bin ls
# Path Version URL Status
# ~/usr/bin/kubemux v1.1.2 https://github.com/corvofeng/kubemux/releases/tag/v1.1.2 OK
# Linux -- using binary
cd /tmp
rm kubemux_linux_amd64.tar.gz
wget https://github.com/corvofeng/kubemux/releases/latest/download/kubemux_linux_amd64.tar.gz
tar -zxvf kubemux_linux_amd64.tar.gz
sudo install -v kubemux /usr/local/bin
ls ~/.kube
# pve-kube.config xxx
kubemux kube --kube pve-kube.config
# I suggest you add the completion support
# source <(kubemux completion bash)
# source <(kubemux completion zsh)
# or you can add the command into the .bashrc or .zshrc.
kubemux kube --kube <tab>
mkdir ~/.tmuxinator
echo '
name: kubemux
root: "~/"
windows:
- p1:
- ls
- pwd
- p2:
- pwd
- echo "hello world"
- p3: htop
' > ~/.tmuxinator/kubemux.yml
kubemux -p kubemux
Here is an example:
You can put the tmux args after the --
.
➜ ~ kubemux -p kubemux -- -V
tmux 3.4
# If -d is specified, any other clients attached to the session are detached.
➜ ~ kubemux -p kubemux -- at -d