Skip to content

Commit 7b808d2

Browse files
committed
update
1 parent 84ebc16 commit 7b808d2

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,50 @@ Command line utility to manage the current environment consisting of kubeconfig,
55
````
66
export TERMINAL_ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
77
````
8+
9+
# Installation
10+
11+
12+
## Binary
13+
14+
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.:
15+
16+
````
17+
# kcfg = kubectx confg
18+
ln -s /usr/local/bin/kubectx /usr/local/bin/kcfg
19+
# kctx = kubectx context
20+
ln -s /usr/local/bin/kubectx /usr/local/bin/kctx
21+
# kns = kubectx namespace
22+
ln -s /usr/local/bin/kubectx /usr/local/bin/kns
23+
````
24+
## Auto completion
25+
26+
Auto completion scripts are provided for [zsh](./completion). They can be added or symlinked, e.g. to `/usr/share/zsh/site-functions`.
27+
28+
29+
# Basic usage
30+
31+
kubectx is build with Cobra so the CLI is build in a familiar way (Cobra is also used in Docker and Kubernetes).
32+
33+
To print a description what kubectx can do, just execute:
34+
35+
````
36+
$ kubectx
37+
kubectx manages kubectl context incl. kubeconfig, context and namespace
38+
39+
Usage:
40+
kubectx [flags]
41+
kubectx [command]
42+
43+
Available Commands:
44+
completion Generates bash completion scripts
45+
config Gets and sets the current config
46+
context Gets and sets the current context
47+
help Help about any command
48+
namespace Gets and sets the current namespace
49+
50+
Flags:
51+
-h, --help help for kubectx
52+
53+
Use "kubectx [command] --help" for more information about a command.
54+
````

0 commit comments

Comments
 (0)