2.0.1 • Published 6 years ago

kubecfg v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

kubecfg

A simple command line tool to add and remove kubectl config files to your environment.

The basic premise is this: You have a number of Kube environments. kubectl supports having those environment configs in different files. This app helps you add and remove files to the saved kubectl environment variable $KUBECONFIG. It saves this in ~/.bashrc or in your Windows environment variables (for the current user).

Find the file you want to add, run kubecfg -a <filename> and boom, added. -r to remove it. Use -s to show the current config paths.

Kubecfg supports Linux (Bash) and Windows (Powershell or Bash).

Installation

npm install -g kubectl

Usage

Navigate to the path that your config file resides and type:

kubecfg -a <filename>

To remove that file

kubecfg -r <filename>

This will update your .bashrc with the new paths.

You'll need to reload .bashrc after you've run the app (any assistance on how to elegantly do this automatically is welcome!)

. ~/.bashrc

kubecfg_good

Switch cluster configs

Remember the cheet sheet commands.

kubectl config view
kubectl config current-context
kubectl config use-context my-cluster-name
2.0.1

6 years ago

2.0.0

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago