Release Notes for v0.0.1
New Features
- Initial release of
kubectl-protected
plugin. - Added functionality to check if the current Kubernetes cluster is protected.
- Supports defining protected clusters using a YAML file.
- Command-line options:
--silence-error-on-protected
: Exit without error if the cluster is protected.--protected-file-path
: Path to the file containing the list of protected clusters (default:$HOME/.kube/protected.yaml
).
Installation
Option 1: Compile from Source
- Clone the repository:
git clone https://github.com/bivas/kubectl-protected.git cd kubectl-protected
- Build the plugin:
go build -o kubectl-protected cmd/protected/main.go
- Move the binary to a directory in your PATH:
mv kubectl-protected /usr/local/bin/
- Verify the installation:
kubectl protected --help
Option 2: Download from Releases
- Visit the releases page of the project.
- Download the appropriate binary for your operating system.
- Move the binary to a directory in your PATH:
mv kubectl-protected /usr/local/bin/
- Verify the installation:
kubectl protected --help
Usage
- Create a YAML file that lists the protected clusters. By default, the plugin looks for this file at
$HOME/.kube/protected.yaml
.
Example protected.yaml
:
protected:
- cluster1
- .*pattern.*
- Run the plugin to check if the current Kubernetes cluster is protected:
kubectl protected
Example with command-line options:
kubectl protected --protected-file-path /path/to/protected.yaml --silence-error-on-protected
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the MIT License. See the LICENSE
file for details.