- Shell 90.4%
- Nix 9.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| flake.lock | ||
| flake.nix | ||
| kubectl-cilium_health_status | ||
| kubectl-create_cnpg_role_secret | ||
| kubectl-createsecret | ||
| kubectl-ctx | ||
| kubectl-debug_pod | ||
| kubectl-ns | ||
| kubectl-use | ||
| LICENSE | ||
| README.md | ||
Kubectl Plugins
A collection of kubectl plugins.
Installation with Devbox
Note: Devbox does not support
git+https://...URLs, so installations must use the read-only GitHub mirror.
Install all plugins from the repository's Nix flake:
devbox global add github:caynevejvoda/kubectl-plugins
To install only one plugin, select its flake package explicitly:
devbox global add github:caynevejvoda/kubectl-plugins#kubectl-ctx
The flake packages include their runtime dependencies. Available package names match the executable names documented below; the default package installs all of them.
ctx
Interactively select a context to use.
Requirements
bash kubectl gum
Installation
curl -o ~/.local/bin/kubectl-ctx https://git.justaserver.de/cayne/kubectl-plugins/raw/branch/main/kubectl-ctx
chmod +x ~/.local/bin/kubectl-ctx
Usage
kubectl ctx
ns
Interactively select a namespace to use.
Requirements
bash kubectl gum
Installation
curl -o ~/.local/bin/kubectl-ns https://git.justaserver.de/cayne/kubectl-plugins/raw/branch/main/kubectl-ns
chmod +x ~/.local/bin/kubectl-ns
Usage
kubectl ns
use
Interactively select a context and namespace to use.
Requirements
bash kubectl gum
Installation
curl -o ~/.local/bin/kubectl-use https://git.justaserver.de/cayne/kubectl-plugins/raw/branch/main/kubectl-use
chmod +x ~/.local/bin/kubectl-use
Usage
kubectl use
createsecret
Interactively create a generic secret.
Requirements
bash kubectl gum
Installation
curl -o ~/.local/bin/kubectl-createsecret https://git.justaserver.de/cayne/kubectl-plugins/raw/branch/main/kubectl-createsecret
chmod +x ~/.local/bin/kubectl-createsecret
Usage
kubectl createsecret
create-cnpg-role-secret
Interactively create a CNPG (CloudNativePG) role secret with SCRAM-SHA-256 password hashing.
Creates a secret with the following format:
apiVersion: v1
kind: Secret
metadata:
name: <secret-name>
namespace: <namespace>
labels:
cnpg.io/reload: "true"
type: Opaque
data:
username: <base64-encoded-username>
password: <base64-encoded-scram-sha-256-hash>
Requirements
bash kubectl gum
scram-sha-256 base64
Installation
curl -o ~/.local/bin/kubectl-create_cnpg_role_secret https://git.justaserver.de/cayne/kubectl-plugins/raw/branch/main/kubectl-create_cnpg_role_secret
chmod +x ~/.local/bin/kubectl-create_cnpg_role_secret
Usage
kubectl create-cnpg-role-secret
Configuration
Optionally create a config file to set a prefix for secret names:
mkdir -p ~/.config/kubectl-create_cnpg_role_secret
echo 'PREFIX=cnpg-role-' > ~/.config/kubectl-create_cnpg_role_secret/config
With this config, if you enter alice as the secret name, the resulting secret
will be named cnpg-role-alice.
cilium-health-status
Interactively select a node, then run cilium-health status --verbose on that
node's Cilium agent pod.
Requirements
bash kubectl gum
Installation
curl -o ~/.local/bin/kubectl-cilium_health_status https://git.justaserver.de/cayne/kubectl-plugins/raw/branch/main/kubectl-cilium_health_status
chmod +x ~/.local/bin/kubectl-cilium_health_status
Usage
kubectl cilium-health-status
debug-pod
Interactively select a context, namespace, pod, and target container, then attach a restricted netshoot debug container.
The selected context is used for this command only. The current kubeconfig context and namespace are not changed.
Requirements
bash kubectl gum
Installation
curl -o ~/.local/bin/kubectl-debug_pod https://git.justaserver.de/cayne/kubectl-plugins/raw/branch/main/kubectl-debug_pod
chmod +x ~/.local/bin/kubectl-debug_pod
Usage
kubectl debug-pod