Andreas Vöst
1 month
Marc Dierig
4 months
Claus-Theodor Riegg
7 years
Claus-Theodor Riegg
6 years
Claus-Theodor Riegg
4 years
Andreas Vöst
8 months

HowTo: Get kubernetes secrets in plaintext

Updated . Posted . Visible to the public.

Here's a one-liner to view base64 encoded secrets in kubernetes. Make sure you have jq installed.

$ kubectl get -n $NAMESPACE secret/$SECRET_NAME -o json| jq '.data | map_values(@base64d)'
{
  "database": "secret1",
  "endpoint": "secret2",
  "username": "secret3",
  "password": "secret4"
}
Florian Heinle
Last edit
Florian Heinle
Tags
License
Source code in this card is licensed under the MIT License.