Skip to content
/ kd Public

A bash script that makes it easy to view the contents of secrets stored in a Kubernetes cluster.

License

Notifications You must be signed in to change notification settings

shini4i/kd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kd

Kubernetes secrets Decoder

Shell Version license

Showcase

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 tool
  • yq: 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 scr/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.