Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Jul 8, 2018
1 parent 84ebc16 commit 7b808d2
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,50 @@ Command line utility to manage the current environment consisting of kubeconfig,
````
export TERMINAL_ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
````

# Installation


## Binary

Go to the [releases](https://github.com/sbueringer/kubectx/releases) page and download the Linux or Windows version. Put the binary to somewhere you want (on UNIX-ish systems, /usr/local/bin or the like). Make sure it has execution bit set. If you want, you can add symlinks to `kcfg`, `kctx` and kns, e.g.:

````
# kcfg = kubectx confg
ln -s /usr/local/bin/kubectx /usr/local/bin/kcfg
# kctx = kubectx context
ln -s /usr/local/bin/kubectx /usr/local/bin/kctx
# kns = kubectx namespace
ln -s /usr/local/bin/kubectx /usr/local/bin/kns
````
## Auto completion

Auto completion scripts are provided for [zsh](./completion). They can be added or symlinked, e.g. to `/usr/share/zsh/site-functions`.


# Basic usage

kubectx is build with Cobra so the CLI is build in a familiar way (Cobra is also used in Docker and Kubernetes).

To print a description what kubectx can do, just execute:

````
$ kubectx
kubectx manages kubectl context incl. kubeconfig, context and namespace
Usage:
kubectx [flags]
kubectx [command]
Available Commands:
completion Generates bash completion scripts
config Gets and sets the current config
context Gets and sets the current context
help Help about any command
namespace Gets and sets the current namespace
Flags:
-h, --help help for kubectx
Use "kubectx [command] --help" for more information about a command.
````

0 comments on commit 7b808d2

Please sign in to comment.