Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kubectx | 14,910 | 3 months ago | 26 | January 11, 2022 | 46 | apache-2.0 | Go | |||
Faster way to switch between clusters and namespaces in kubectl | ||||||||||
Kubie | 1,492 | a month ago | 21 | December 08, 2021 | 42 | zlib | Rust | |||
A more powerful alternative to kubectx and kubens | ||||||||||
Vikube.vim | 190 | 3 years ago | 6 | Vim script | ||||||
Operating Kubernetes Cluster from Vim, in Vim | ||||||||||
Terraform | 163 | 6 days ago | 1 | apache-2.0 | HCL | |||||
The place to storing Terraform modules of many providers | ||||||||||
K8s Scripts | 78 | 4 | 6 years ago | 13 | February 08, 2017 | 9 | apache-2.0 | Shell | ||
Opinionated scripts for managing application deployment lifecycle in Kubernetes | ||||||||||
Kubectl Ctx | 37 | 9 months ago | mit | Go | ||||||
Simple kubectl plugin to display/switch contexts | ||||||||||
Kx | 35 | 3 months ago | 5 | May 29, 2021 | mit | Rust | ||||
Interactively switch between kubernetes contexts without any external dependencies | ||||||||||
Helm Switcher | 32 | 2 years ago | 6 | July 06, 2021 | 2 | mit | Go | |||
CLI tool to help install and switch between versions of Helm for Kubernetes | ||||||||||
Kubeswitch | 27 | 4 years ago | mit | Swift | ||||||
MacOS Status Bar App to switch between kubernetes contexts | ||||||||||
Kubectx Rs | 23 | 3 years ago | 4 | July 29, 2017 | 2 | Shell | ||||
Switch between Kubernetes contexts 🏎 |
Tool to generate tmuxp configs that help to switch between multiple Kubernetes contexts safely.
When working with multiple Kubernetes clusters its painful to switch context
using kubectl
or kubectx
. There are also possibilities of making unintentional changes.
kube-tmuxp
solves this by using one preconfigured tmux
session per Kubernetes cluster. Each tmux
session contains
only one Kubernetes context thus preventing accidental context switching inside a session. Contexts can be switched by
switching tmux
sessions. For example: [tmux prefix] + S
.
Given a config similar to config.sample.yaml, kube-tmuxp
generates:
~/.kube/configs
tmuxp
config for each Kubernetes cluster under ~/.tmuxp
The generated tmuxp
configs can be used to start preconfigured tmux
sessions.
brew tap thecasualcoder/stable
brew install kube-tmuxp
git clone https://github.com/thecasualcoder/kube-tmuxp.git
cd kube-tmuxp
make build
cp ./out/kube-tmuxp /usr/local/bin/kube-tmuxp
tmuxp
configsCopy the sample config (config.sample.yaml)
cp config.sample.yaml ~/.kube-tmuxp.yaml
Add your projects and clusters to the copied config
Generate kubeconfigs and tmuxp configs
kube-tmuxp gen
Default config path is $HOME/.kube-tmuxp.yaml
. If you are using a different path, then use the --config
flag to
specify that path. Refer kube-tmuxp --help
for more details.
$ kube-tmuxp gcloud-generate --help
Generates configs for kube-tmuxp based on gcloud account
Usage:
kube-tmuxp gcloud-generate [flags]
Flags:
--additional-envs strings Additional envs to be populated
--all-projects Skip confirmation for projects
--apply Directly create the tmuxp configs for selected projects
-h, --help help for gcloud-generate
--project-ids strings Comma separated Project IDs to which the configurations need to be fetched
$ kube-tmuxp gcloud-generate
# this will prompt for the projectIDs selection. Type to filter and select using space
# fuzzy search will work
$ kube-tmuxp gcloud-generate --projectIDs project1,project2
$ kube-tmuxp gcloud-generate --allProjects
kube-tmuxp provides four envs:
KUBETMUXP_CLUSTER_NAME
,KUBETMUXP_CLUSTER_LOCATION
,KUBETMUXP_CLUSTER_IS_REGIONAL
,GCP_PROJECT_ID
. We can pass additional envs also.
$ kube-tmuxp gcloud-generate --additionalEnvs 'NEW_KEY=new_value,NEW_ENV=$HOME,KUBE_CONFIG=$HOME/.kube/configs/$KUBETMUXP_CLUSTER_NAME'
# each tmux session will have 7 envs (4 predefined, 3 additionalEnvs passed as argument)
$ kube-tmuxp gcloud-generate --apply
tmuxp load my-context-name
Now you will be inside a tmux
session preconfigured with Kubernetes context my-context-name
.
Use the bash
functions
available here to
switch, kill sessions easily. Special thanks to @jskswamy for writing these awesome
functions.