https://github.com/benjefferies/safe-kubectl
Oh my zsh plugin to make kubectl commands a bit safer
https://github.com/benjefferies/safe-kubectl
kubectl plugin zsh zsh-plugin
Last synced: about 19 hours ago
JSON representation
Oh my zsh plugin to make kubectl commands a bit safer
- Host: GitHub
- URL: https://github.com/benjefferies/safe-kubectl
- Owner: benjefferies
- License: mit
- Created: 2019-09-06T10:37:25.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-16T09:21:24.000Z (almost 6 years ago)
- Last Synced: 2024-05-02T06:07:31.860Z (over 1 year ago)
- Topics: kubectl, plugin, zsh, zsh-plugin
- Language: Shell
- Size: 15.6 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - safe-kubectl - Add some safety when running [kubectl](https://kubernetes.io/docs/reference/kubectl/) by warning what context you're in after a definable number of seconds since the last `kubectl` command. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - safe-kubectl - Add some safety when running 🌎 [kubectl](kubernetes.io/docs/reference/kubectl/) by warning what context you're in after a definable number of seconds since the last `kubectl` command. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - safe-kubectl - Add some safety when running `kubectl` by warning what context you're in after a definable number of seconds since the last `kubectl` command. (Plugins / Zinit (née zplugin))
README
# Safe kubectl
Plugin to add some safety when running kubectl. When there are kubernetes clusters you still run `kubectl` against but you want confidence through periodic reminders you can install this zsh plugin.

## Installing
1. Clone the custom repo
```
cd $HOME/.oh-my-zsh/custom/plugins
git clone https://github.com/benjefferies/safe-kubectl
```
1. Add the safe-kubectl plugin in your `$HOME/.zshrc` [plugins](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins) e.g.
```
plugins=(git kubectl safe-kubectl)
```
1. Reload or `source $HOME/.zshrc`
## Customising
* `KUBECTL_PATH` - Set the path where kubectl is. Default `/usr/local/bin/kubectl`
* `KUBECTL_SAFE_CLUSTERS` - Set clusters you want to exclude from safety checks. E.g. KUBECTL_SAFE_CLUSTERS="master dev integ"
* `KUBECTL_SAFE_TIME` - Set the safe time you can run a kubectl command within without safety prompt. Default `300`