kd
January 2, 2026 ยท View on GitHub
kd is a bash script that decodes Kubernetes secrets. It makes it easy to view the contents of secrets stored in a Kubernetes cluster.
There are alternatives to this script, but they are either not maintained or require way too many dependencies.
Prerequisites
Before you can use kd, you need to have the following installed:
kubectl: the Kubernetes command-line toolyq: a YAML parser and processor
Installation
Option 1: Install with Homebrew (macOS and Linux)
If you're using macOS or Linux, you can install kd using Homebrew. To do so, run the following command:
brew install shini4i/tap/kd
Option 2: Install manually
To install kd manually, download the src/kd.sh script and add it to your PATH. You can do this by running the following commands:
curl https://raw.githubusercontent.com/shini4i/kd/main/src/kd.sh -o kd
chmod +x kd
sudo mv kd /usr/local/bin/
Usage
Here are some examples of how to use kd:
# Decode a secret in the current namespace
kd my-secret
# Decode a secret in a specific namespace
kd my-secret my-namespace
Contributing
Contributions to kd are welcome! Please open an issue or a pull request if you find a bug or want to submit a patch.
New feature requests are not expected, but suggestions for improving the existing functionality or fixing bugs are appreciated.