Skip to content

Repository files navigation

Kubernetes secret decoder a.k.a ksd

codecov

Buy Me A Coffee

ksd is a tool, whose aim is help you to visualize in text plain your kubernetes secrets, either yaml or json outputs.

Installation

Krew (kubectl plugin manager)

kubectl krew install ksd

Homebrew (macOS/Linux)

brew install --cask mfuentesg/tap/ksd

Go Install

go install github.com/mfuentesg/ksd@latest

Download Binary

Download the latest binary for your platform from the releases page.

Usage

$ kubectl get secret <secret name> -o <yaml|json> | ksd
$ ksd < secret.<yaml|json>

Installed via Krew? Use kubectl ksd in place of ksd:

$ kubectl get secret <secret name> -o <yaml|json> | kubectl ksd

Example

secret.json

{
    "apiVersion": "v1",
    "data": {
        "password": "c2VjcmV0",
        "app": "a3ViZXJuZXRlcyBzZWNyZXQgZGVjb2Rlcg=="
    },
    "kind": "Secret",
    "metadata": {
        "name": "kubernetes secret decoder",
        "namespace": "ksd"
    },
    "type": "Opaque"
}
$ ksd < secret.json

output

{
    "apiVersion": "v1",
    "kind": "Secret",
    "metadata": {
        "name": "kubernetes secret decoder",
        "namespace": "ksd"
    },
    "stringData": {
        "app": "kubernetes secret decoder",
        "password": "secret"
    },
    "type": "Opaque"
}

See also

  • kubectl-view-secret — another kubectl plugin for viewing/decoding Kubernetes secrets, also available via Krew.

About

kubernetes secret decoder

Topics

Resources

Stars

95 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages