https://github.com/sanderploegsma/kubectl-snap
Delete half of the pods in a Kubernetes cluster or namespace
https://github.com/sanderploegsma/kubectl-snap
kubectl-plugin kubectl-plugins kubernetes
Last synced: 4 months ago
JSON representation
Delete half of the pods in a Kubernetes cluster or namespace
- Host: GitHub
- URL: https://github.com/sanderploegsma/kubectl-snap
- Owner: sanderploegsma
- License: unlicense
- Created: 2023-03-28T10:59:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-17T09:10:43.000Z (4 months ago)
- Last Synced: 2025-02-17T10:23:58.951Z (4 months ago)
- Topics: kubectl-plugin, kubectl-plugins, kubernetes
- Language: Go
- Homepage:
- Size: 124 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubectl-snap
Perfectly balanced, as all things should be...
## About
`kubectl-snap` is a plugin for `kubectl` that deletes half of the pods in your Kubernetes cluster or namespace.
Inspired by [honk-ci/kubectl-snap](https://github.com/honk-ci/kubectl-snap), but rewritten in Go based on [kubernetes/sample-cli-plugin](https://github.com/kubernetes/sample-cli-plugin).## Install
### Homebrew
On macOS and Linux you can install using [Homebrew](https://brew.sh):
brew install sanderploegsma/tap/kubectl-snap
### Manual
Grab the latest release for your platform and place the binaries somewhere in your `PATH`, like `/usr/local/bin`.
## Usage
```
Usage:
kubectl-snap [flags]Examples:
# Snap pods in the kube-system namespace
kubectl snap -n kube-system
# Snap pods in all namespaces without prompting for confirmation (USE WITH CAUTION)
kubectl snap -FFlags:
--all If true, includes ALL Pods when snapping
-F, --force If true, do not prompt for confirmation
-h, --help help for kubectl-snap
--include-orphaned-pods If true, includes orphaned Pods when snapping
--include-stopped-pods If true, includes stopped Pods when snapping
-n, --namespace string If present, the namespace scope for this CLI request
-v, --verbose Enable verbose output
--version version for kubectl-snap
```