A collection of kubectl plugins
  • Shell 90.4%
  • Nix 9.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-01 20:02:00 +02:00
flake.lock feat: Add Nix flake 2026-09-01 20:02:00 +02:00
flake.nix feat: Add Nix flake 2026-09-01 20:02:00 +02:00
kubectl-cilium_health_status feat: Add kubectl plugin to run cilium-health status interactively 2026-03-02 09:57:57 +01:00
kubectl-create_cnpg_role_secret feat: Add kubectl plugin to create CNPG role secrets 2026-02-02 09:44:41 +01:00
kubectl-createsecret feat: ✨ Add plugin to interactively create kubernetes secrets 2025-11-08 19:04:11 +01:00
kubectl-ctx feat: ✨ Initial commit 2025-11-08 19:03:04 +01:00
kubectl-debug_pod feat: Add kubectl-debug_pod plugin 2026-09-01 19:27:44 +02:00
kubectl-ns feat: ✨ Initial commit 2025-11-08 19:03:04 +01:00
kubectl-use feat: ✨ Initial commit 2025-11-08 19:03:04 +01:00
LICENSE feat: ✨ Initial commit 2025-11-08 19:03:04 +01:00
README.md feat: Add Nix flake 2026-09-01 20:02:00 +02:00

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