{"repo":"jonmosco/kube-ps1","free":true,"listed":false,"github":"https://github.com/jonmosco/kube-ps1","clone":"git clone https://github.com/jonmosco/kube-ps1.git","description":"Kubernetes prompt info for bash, fish, and zsh","language":"Shell","stars":3806,"topics":["kubernetes","kubectl","zsh","bash","containers","prompts","sre","kubernetes-helper"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"kube-ps1: Kubernetes prompt for bash, zsh, and fish A script that lets you add the current Kubernetes context and namespace configured on kubectl to your Bash, Zsh, or Fish prompt. Inspired by several tools used to simplify usage of kubectl . Installing Packages MacOS Brew Ports Homebrew package manager: Arch Linux AUR Package available at https://aur.archlinux.org/packages/kube-ps1/. Oh My Zsh https://github.com/ohmyzsh/ohmyzsh kube-ps1 is included as a plugin in the oh-my-zsh project. To enable it, edit your /.zshrc and add the plugin: Zsh zinit plugin Using zinit Update .zshrc with: Fig Install kube-ps1 in zsh, bash, or fish with one click. From Source (git clone) 1. Clone this repository 2. Source the kube-ps1.sh in your /.zshrc or your /.bashrc Zsh Bash Fish Add this to /.config/fish/config.fish : Note: Fish users should source kube-ps1.fish instead of kube-ps1.sh . Requirements The default prompt assumes you have the kubectl command line utility installed. Official installation instructions and binaries are available: Install and Set up kubectl If using this with OpenShift, the oc tool needs installed. It can be obtained from brew ports: or the source can be downloaded: OC Client Tools Set the binary to oc with the following variable: If neither binary is available, the prompt will print the following: Helper utilities There are several great tools that make using kubectl very enjoyable: - kubectx and kubens are great for fast switching between clusters and namespaces. ","default_branch":null,"files":null,"tree":[],"storefront":"/r/jonmosco","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jonmosco/kube-ps1/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}