https://github.com/beleap/kubectl-check
A CLI tool to prompt users for confirmation before running potentially unsafe kubectl commands.
https://github.com/beleap/kubectl-check
cli kubectl kubectl-plugin kubectl-plugins kubernetes rust
Last synced: over 1 year ago
JSON representation
A CLI tool to prompt users for confirmation before running potentially unsafe kubectl commands.
- Host: GitHub
- URL: https://github.com/beleap/kubectl-check
- Owner: BeLeap
- License: mit
- Created: 2024-10-01T09:52:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-27T07:27:23.000Z (over 1 year ago)
- Last Synced: 2025-03-16T16:03:04.911Z (over 1 year ago)
- Topics: cli, kubectl, kubectl-plugin, kubectl-plugins, kubernetes, rust
- Language: Rust
- Homepage:
- Size: 343 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubectl-check

A CLI tool to prompt users for confirmation before running potentially unsafe kubectl commands.
> [!IMPORTANT]
> The prompt will be disabled if the command is excuted in non-interactive terminal.
## Installation
- **Download the binary from releases**
Head over to the [releases page](https://github.com/beleap/kubectl-check/releases) to download the binary.
- **Using homebrew**
```bash
brew tap beleap/tap
brew install beleap/tap/kubectl-check
```
## Tips
- **Set alias**
```bash
alias k="kubectl check"
```
- **Configure unsafe commands**
Can be configured with `KUBECTL_CHECK_UNSAFE` environment variable. Provide a comma-delimited string like `edit,scale`.
- Default unsafe commands can be found [here](https://github.com/BeLeap/kubectl-check/blob/main/src/main.rs#L63-L66).