kubectl get secrets

Category: Kubernetes & Containers

kubectl get secrets

List secrets in the current namespace

Shows secrets, which store sensitive data like passwords and tokens in base64-encoded form. Values are never printed here, only names and types. Create them with kubectl create secret generic db-pass --from-literal=password=secret.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.