ksd

command module
v1.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 4 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
decoder
Package decoder converts the base64-encoded `data` field of a Kubernetes Secret manifest into a plaintext `stringData` field.
Package decoder converts the base64-encoded `data` field of a Kubernetes Secret manifest into a plaintext `stringData` field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL