Skip to content

johnjeffers/kset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kset

A simple utility to list and activate kubeconfig files.

kset is a hybrid CLI. The Go binary discovers kubeconfig files, matches filenames, prompts for context choices, and emits shell commands. A shell wrapper evaluates those commands so KUBECONFIG changes in your current shell.

Setup

Build the binary:

make build

Install a shell function:

eval "$(./bin/kset --shell-function)"

For regular use, add the function output to your shell startup file.

Usage

Activate a kubeconfig by filename substring:

kset dev

List and select from all kubeconfigs:

kset

The interactive picker shows numbered kubeconfigs, supports type-to-filter with multiple terms including numbers, and accepts = plus a list number followed by return.

Activate by list number:

kset 2

Use a non-default kubeconfig directory:

kset --config-dir ~/clusters prod

Unset KUBECONFIG and return to the default ~/.kube/config behavior:

kset --unset

When a selected kubeconfig has multiple contexts, kset prompts for a context and updates current-context in that kubeconfig file. KUBECONFIG is exported directly to the selected source file.

About

A simple little utility to list and activate your kubeconfig files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors