Skip to content

A tmux wrapper for managing multiple clusters and incorporating tmuxinator.

License

Notifications You must be signed in to change notification settings

corvofeng/kubemux

Repository files navigation

kubemux

blog-test

A tmux wrapper for managing multiple clusters and incorporating tmuxinator.

Doc: https://kubemux.corvo.fun

Blog:

Most of the code is generated by ChatGPT.

Installation

# 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

Usage

kubeconfig

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>

asciicast

tmuxinator

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:

asciicast

tmux arg support

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