A Kubernetes administration workstation toolkit for DevOps, security, policy, troubleshooting, and productivity workflows.
kube-arsenal.sh is an idempotent bootstrap and validation script used to install, configure, and check a Kubernetes administration workstation.
It provides a curated CLI toolbox for Kubernetes administrators, DevOps engineers, platform engineers, and SREs who need a consistent local environment for cluster operations, troubleshooting, manifest validation, security scanning, secrets handling, and policy-as-code workflows.
The script provides two main execution modes:
--install/-i: install and configure the validated workstation toolchain.--check/-c: check installed binaries, versions,kubectlplugins, and display a categorized summary.
Without arguments, the script prints its built-in help.
The script is optimized for:
- Ubuntu
- Debian
- WSL2
- zsh or bash
The default shell configuration target is:
$HOME/.zshrcThis can be overridden with the SHELL_RC environment variable.
The install mode provisions the following tools.
| Tool | Purpose |
|---|---|
kubectl |
Main Kubernetes CLI |
helm |
Kubernetes package manager |
kustomize |
Kubernetes manifest customization |
k9s |
Terminal UI for Kubernetes |
stern |
Multi-pod log tailing |
kubectx |
Fast Kubernetes context switching |
kubens |
Fast Kubernetes namespace switching |
| Tool | Purpose |
|---|---|
kind |
Kubernetes in Docker |
docker |
Docker CLI / Docker Desktop integration check |
Docker is not installed by default unless explicitly requested with INSTALL_DOCKER=true.
| Tool | Purpose |
|---|---|
jq |
JSON processing |
yq |
YAML processing using Mike Farah yq |
fzf |
Fuzzy finder |
bat / batcat |
Better file viewer |
ripgrep / rg |
Fast recursive search |
tree |
Directory tree display |
watch |
Repeated command execution |
curl |
HTTP client |
wget |
File downloader |
git |
Version control |
unzip |
Archive extraction |
tar |
Archive management |
| Tool | Purpose |
|---|---|
kubeconform |
Kubernetes manifest validation |
kube-score |
Kubernetes best-practice scoring |
pluto |
Deprecated Kubernetes API detection |
kubent |
Deprecated Kubernetes API detection |
conftest |
OPA/Rego policy testing |
opa |
Open Policy Agent CLI |
kyverno |
Kyverno CLI for Kubernetes-native policies |
| Tool | Purpose |
|---|---|
trivy |
Vulnerability, IaC, container image, and Kubernetes scanning |
grype |
Vulnerability scanning |
syft |
SBOM generation |
| Tool | Purpose |
|---|---|
sops |
Secrets encryption |
age |
Modern file encryption |
age-keygen |
Age key generation |
kubeseal |
Sealed Secrets CLI |
The script installs krew and the following plugins:
| Plugin | Purpose |
|---|---|
neat |
Clean Kubernetes YAML output |
tree |
Display Kubernetes resource ownership trees |
who-can |
RBAC permission discovery |
ctx |
Context switching plugin |
ns |
Namespace switching plugin |
sniff |
Packet capture plugin |
./kube-arsenal.shor:
./kube-arsenal.sh --helpchmod +x kube-arsenal.sh
./kube-arsenal.sh --installShort form:
./kube-arsenal.sh -i./kube-arsenal.sh --checkShort form:
./kube-arsenal.sh -c| Variable | Default | Description |
|---|---|---|
INSTALL_DOCKER |
false |
When set to true, installs docker.io if Docker is missing |
INSTALL_DIR |
/usr/local/bin |
Target directory for binaries installed from release archives |
SHELL_RC |
$HOME/.zshrc |
Shell configuration file updated by install mode |
Example:
INSTALL_DOCKER=true ./kube-arsenal.sh --installExample with a custom shell configuration file:
SHELL_RC="$HOME/.bashrc" ./kube-arsenal.sh --installOn WSL2, Docker Desktop with WSL integration is recommended.
By default, the script does not install Docker if the docker binary is missing. This avoids replacing or conflicting with a Docker Desktop based setup.
To force Linux-side Docker installation:
INSTALL_DOCKER=true ./kube-arsenal.sh --installInstall mode writes a managed block into the configured shell RC file.
Default target:
~/.zshrcThe block is delimited by:
# >>> kube-arsenal managed block >>>
# <<< kube-arsenal managed block <<<If the block already exists, it is replaced cleanly. This prevents duplicate aliases or functions after repeated executions.
The managed block configures:
KUBE_EDITORKREW_ROOTpath integrationkubectlcompletionhelmcompletion- optional
kubectxandkubenscompletion - Kubernetes aliases
- Helm/K9s/Stern aliases
- manifest validation helpers
- policy testing helpers
- deprecated API detection helpers
- Debian/Ubuntu
batcatcompatibility alias
After installation, reload your shell:
source ~/.zshrck='kubectl'
kg='kubectl get'
kd='kubectl describe'
ka='kubectl apply -f'
kdel='kubectl delete'
ke='kubectl edit'
kl='kubectl logs'
klf='kubectl logs -f'
kex='kubectl exec -it'
kpf='kubectl port-forward'
kctx='kubectx'
kns='kubens'kgn='kubectl get nodes'
kgp='kubectl get pods'
kgpa='kubectl get pods -A'
kgs='kubectl get svc'
kgsa='kubectl get svc -A'
kgd='kubectl get deploy'
kgda='kubectl get deploy -A'
kging='kubectl get ingress'
kginga='kubectl get ingress -A'
kgcm='kubectl get configmap'
kgsec='kubectl get secret'
kgns='kubectl get ns'
kgev='kubectl get events --sort-by=.lastTimestamp'
kgeva='kubectl get events -A --sort-by=.lastTimestamp'kwhere
ksecret-decode <secret-name> <key>
krestart <deployment-name>
klog-label <label-selector>
kpf-svc <service-name> <local-port> <remote-port>
kstern <label-selector>
ksternA <label-selector>kval <path>
kscore <path>
kscan-config <path>kpolicy-test <resource-file-or-directory>
kyverno-test <policy-file> <resource-file>kdeprecated
kdeprecated-pluto
kdeprecated-helm
kdeprecated-files <directory>
kdeprecated-kubentThe check mode prints a categorized inventory of the workstation tools.
./kube-arsenal.sh --checkIt validates:
- binary presence
- basic version output
- Docker CLI presence
kubectl krew- installed
kubectlplugins bat/batcatcompatibility
The output is grouped by category:
- Core Kubernetes Tools
- Context and Namespace Switching
- Local Cluster and Container Tools
- Productivity CLI Tools
- Kubernetes Manifest Validation and Quality
- Security, Vulnerability Scanning and SBOM
- Secrets and Encryption
- GitOps and Delivery
- Networking, Ingress and Service Mesh
- Certificates, Backup and Cluster Internals
- Kubectl Plugin Manager and Plugins
- Summary
Some tools are intentionally reported as missing when they are outside the selected workstation baseline, for example:
argocdfluxhelmfileskaffoldtiltciliumhubbleistioctllinkerdcmctlveleroetcdctl
These are stack-specific and can be installed later if needed.
./kube-arsenal.sh --installsource ~/.zshrc./kube-arsenal.sh --checkkval ./manifests
kscore ./manifests
kscan-config ./manifestskdeprecatedkstern app=my-appThe script can be tested inside an Ubuntu container to validate installation flow and binary availability.
Example:
docker run --rm -it \
-v "$PWD/kube-arsenal.sh:/tmp/kube-arsenal.sh:ro" \
ubuntu:24.04 \
bashInside the container:
apt-get update
apt-get install -y sudo ca-certificates curl wget git gnupg lsb-release jq
useradd -m -s /bin/bash testuser
echo "testuser ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/testuser
chmod 0440 /etc/sudoers.d/testuser
su - testuser
cp /tmp/kube-arsenal.sh ~/
chmod +x ~/kube-arsenal.sh
INSTALL_DOCKER=false SHELL_RC="$HOME/.zshrc" ~/kube-arsenal.sh --install
~/kube-arsenal.sh --checkThis validates:
- dependency installation
- GitHub release downloads
- binary installation into
/usr/local/bin krewinstallationkubectlplugin installation- shell configuration block injection
- version checks
It does not validate access to a real Kubernetes cluster.
The script is designed to be re-run safely.
Repeated executions will:
- skip or overwrite binaries as appropriate
- avoid duplicate shell configuration blocks
- preserve a single managed shell block
- reinstall or update release-based binaries
- keep
krewplugins available in the current non-interactive script execution
This script does not configure:
- Kubernetes cluster access
- kubeconfig files
- cloud provider authentication
- Docker Desktop itself
- GitOps controllers inside a cluster
- cert-manager
- Velero server-side components
- service mesh control planes
It installs and configures the local CLI workstation only.
Recommended minimal repository layout:
.
├── README.md
├── LICENSE
└── kube-arsenal.sh
This project is licensed under the MIT License. See the LICENSE file for details.
This script was built from a validated Kubernetes administration workstation baseline and tested with:
- local workstation execution
- Docker container execution
- integrated check mode
kubectl krewplugin path reload- managed
.zshrcblock replacement