How to Retrieve secrets values

oc get secret my-secret -n my-project --template={{.data.my-secret-key}} | base64 -d

oc get secret my-secret -n my-project -o go-template --template="{{.data.my-secret-key|base64decode}}"

oc extract secrets/my-secret -n my-project

oc get secret my-secret -n my-project -o jsonpath="{.data['tls\.key']}" | base64 -d
Previous
Next