Skip to content

A kubectl plugin to quickly switch kcp workspaces

License

Notifications You must be signed in to change notification settings

embik/kubectl-switch-ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kubectl-switch-ws

A kubectl plugin to quickly switch kcp workspaces interactively.

kubectl-switch-ws demo

Installation

Prequisites

To run this kubectl plugin you need:

Krew

This installation method requires krew installed.

Add the krew index and synchronize the local copy of it:

$ kubectl krew index add embik https://github.com/embik/krew-index.git
$ kubectl krew update

kubectl-switch-ws can now be installed with the following command:

$ kubectl krew install embik/switch-ws

Manual

Copy kubectl-switch_ws into our $PATH (e.g. ~/bin or ~/.local/bin, depending on your system setup).

Usage

Run kubectl switch-ws to start the interactive workspace switcher. Navigate the list of child workspaces in the current workspace and press enter to switch to a specific workspace.

Use the pseudo element .. to go up one level to the parent workspace.

Use [exit] or press ESC when you have reached the workspace you intended to navigate to.