Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

README.md

Simple kubeconfig switcher

Why do I did this project?

I know there is the cool way of dealing with multiple k8s clusters, by merging the different kube-configs in ~/.kube/config and use kubectl config use-context to switch them. Currently I'm setting up a lot of clusters, with their own kubeconfigs, and I'm getting tired of all that merging.

Actually, life can be simpler just by rotating that configs around. So I spent that 10 minutes of bashing that project to make my (and maybe your) life easier.

How to install?

  • clone that project
  • put it into a folder behind your $PATH, like /usr/bin, /usr/local/bin or what ever you want
  • you are done...it's simple bash, and does not depend on any lib

How to use?

whenever a wild kubeconfig appears, add it with

$ kubeconfig-loader add my-new-cluster /path/to/new/kubeconfig/file

proof you have my-new-cluster available with

$ kubeconfig-loader ls

switch to that cluster by

$ kubeconfig-loader use my-new-cluster

and check it works with

$ kubectl get node

or any other kubectl related command

happy kubing

About

A simple bash script for rotating local kubeconfigs

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.