ksd
is a tool, whose aim is help you to visualize in text plain your kubernetes secrets, either yaml
or json
outputs.
$ go get github.com/mfuentesg/ksd
brew install mfuentesg/tap/ksd
$ kubectl get secret <secret name> -o <yaml|json> | ksd
$ ksd < kubectl get secret <secret name> <secret file>.<yaml|json>
kube_secret.json
{
"apiVersion": "v1",
"data": {
"password": "c2VjcmV0",
"app": "a3ViZXJuZXRlcyBzZWNyZXQgZGVjb2Rlcg=="
},
"kind": "Secret",
"metadata": {
"name": "kubernetes secret decoder",
"namespace": "ksd"
},
"type": "Opaque"
}
$ ksd < kube_secret.json
output
{
"apiVersion": "v1",
"data": {
"password": "secret",
"app": "kubernetes secret decoder"
},
"kind": "Secret",
"metadata": {
"name": "kubernetes secret decoder",
"namespace": "ksd"
},
"type": "Opaque"
}