hardkubectl

Extract and decode a specific key from a Kubernetes secret

command

kubectl get secret SECRET_NAME -o jsonpath='{.data.KEY}' | base64 --decode

also accepted

kubectl get secret SECRET_NAME -o jsonpath

Command breakdown

Part of the Kubernetes CLI (kubectl) — ConfigMaps & Secrets category.

kubectlgetsecretSECRET_NAME-ojsonpath='{.data.KEY}'|base64--decode
FlagPurpose
-oBoolean flag
--decodeBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →