A collection of small tools to work with Kubernetes | Read-only mirror of https://github.com/swisscom/kube-tools — Swisscom. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2021-03-17 13:26:39 +01:00
cmd initial commit 2021-03-17 11:33:36 +01:00
docs/screenshots doc: improve documentation and kcn screenshot 2021-03-17 13:21:44 +01:00
pkg initial commit 2021-03-17 11:33:36 +01:00
.gitignore initial commit 2021-03-17 11:33:36 +01:00
go.mod initial commit 2021-03-17 11:33:36 +01:00
go.sum initial commit 2021-03-17 11:33:36 +01:00
LICENSE.md chore: add license 2021-03-17 13:26:39 +01:00
README.md doc: improve documentation and kcn screenshot 2021-03-17 13:21:44 +01:00

kube-tools

A collection of tools to work with Kubernetes

kube-ps1

A super simple command to display a string that you can easily put in your PS1 prompt. The output is usually used in your prompt as follows:

kube-ps1 prompt

Usage

Depending on what and how you want your prompt look like, put the following in your ~/.zshrc / ~/.bashrc:

PS1='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%2~ %{$fg[yellow]$(kube-ps1) %}$(git_prompt_info)%{$reset_color%}%(!.#.$) '

Basically, call $(kube-ps1) in your prompt and enjoy!

kcn

Simple utility to switch between namespaces

kcn prompt

Usage

$ kcn ns1 # Switches to ns1