summaryrefslogtreecommitdiff
path: root/plugins/kube-ps1/README.md
diff options
context:
space:
mode:
authorKozlov Alexander <badryke@gmail.com>2018-11-16 13:38:43 +0300
committerGitHub <noreply@github.com>2018-11-16 13:38:43 +0300
commit8c95c52353118643ac3dbd9b0c185a3129b84bf8 (patch)
treeee7497251b7a541480ae5c6a97b63b14381ed5ee /plugins/kube-ps1/README.md
parentdd30cf104c9ca42d89d26a134382ca421869ce7e (diff)
parent3d8f2bda599c8c6d160dc448e5ab28aaf2d5e90d (diff)
downloadzsh-8c95c52353118643ac3dbd9b0c185a3129b84bf8.tar.gz
zsh-8c95c52353118643ac3dbd9b0c185a3129b84bf8.tar.bz2
zsh-8c95c52353118643ac3dbd9b0c185a3129b84bf8.zip
Merge branch 'master' into master
Diffstat (limited to 'plugins/kube-ps1/README.md')
-rw-r--r--plugins/kube-ps1/README.md81
1 files changed, 81 insertions, 0 deletions
diff --git a/plugins/kube-ps1/README.md b/plugins/kube-ps1/README.md
new file mode 100644
index 000000000..fcb73cd2d
--- /dev/null
+++ b/plugins/kube-ps1/README.md
@@ -0,0 +1,81 @@
+# Kubernetes prompt for zsh
+
+A Kubernetes zsh prompt that displays the current cluster cluster
+and the namespace.
+
+Inspired by several tools used to simplify usage of kubectl
+
+NOTE: If you are not using zsh, check out [kube-ps1](https://github.com/jonmosco/kube-ps1)
+designed for bash as well as zsh.
+
+## Requirements
+
+The default prompt assumes you have the kubectl command line utility installed. It
+can be obtained here:
+
+[Install and Set up kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
+
+If using this with OpenShift, the oc tool needs installed. It can be obtained from here:
+
+[OC Client Tools](https://www.openshift.org/download.html)
+
+## Helper utilities
+
+There are several great tools that make using kubectl very enjoyable.
+
+[kubectx and kubenx](https://github.com/ahmetb/kubectx) are great for
+fast switching between clusters and namespaces.
+
+## Prompt Structure
+
+The prompt layout is:
+
+```
+(<symbol>|<cluster>:<namespace>)
+```
+
+## Enabling
+
+In order to use kube-ps1 with Oh My Zsh, you'll need to enable them in the
+.zshrc file. You'll find the zshrc file in your $HOME directory. Open it with
+your favorite text editor and you'll see a spot to list all the plugins you
+want to load.
+
+```shell
+vim $HOME/.zshrc
+```
+
+Add kube-ps1 to the list of enabled plugins:
+
+```shell
+plugins=(
+ git
+ kube-ps1
+)
+```
+
+## Colors
+
+Blue was used as the prefix to match the Kubernetes color as closely as
+possible. Red was chosen as the cluster name to stand out, and cyan
+for the namespace. These can of course be changed.
+
+## Customization
+
+The default settings can be overridden in ~/.zshrc
+
+| Variable | Default | Meaning |
+| :------- | :-----: | ------- |
+| `KUBE_PS1_BINARY` | `kubectl` | Default Kubernetes binary |
+| `KUBE_PS1_PREFIX` | `(` | Prompt opening character |
+| `KUBE_PS1_SYMBOL_ENABLE` | `true ` | Display the prompt Symbol. If set to `false`, this will also disable `KUBE_PS1_SEPARATOR` |
+| `KUBE_PS1_SYMBOL_DEFAULT` | `⎈ ` | Default prompt symbol. Unicode `\u2388` |
+| `KUBE_PS1_SYMBOL_USE_IMG` | `false` | ☸️ , Unicode `\u2638` as the prompt symbol |
+| `KUBE_PS1_NS_ENABLE` | `true` | Display the namespace. If set to `false`, this will also disable `KUBE_PS1_DIVIDER` |
+| `KUBE_PS1_SEPERATOR` | `\|` | Separator between symbol and cluster name |
+| `KUBE_PS1_DIVIDER` | `:` | Separator between cluster and namespace |
+| `KUBE_PS1_SUFFIX` | `)` | Prompt closing character |
+
+## Contributors
+
+Jared Yanovich