JAEN

Kubernetes

kubectl get secret

CautionInspect Secrets

kubectl get secret [-n ns]

Lists secrets; values are base64 — extract with -o jsonpath and pipe to base64 -d. Handle with care.

Examples

  • kubectl get secret db-cred -o jsonpath='{.data.password}' | base64 -dDecode one value

Syntax

kubectl get secret [name] [-o yaml]

Before you run it

Don't show decoded values on shared screens or leave them in logs.

Used when you see

ImagePullBackOff
2
Verify the imagePullSecret
See the whole flow →

Related commands

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store