Viewing secrets
The get command can be used to list secrets and view their contents.
-
To view a list of all secrets, run the following command.
kubectl get secretsIf a namepace is beign used, the -n argument must be inclued.
kubectl get secrets -n namespace\_namewhere namespace_name is the name of the namespace.
-
To view the content of a secret, run the following command.
kubectl describe secret secret\_namewhere secret_name is the name of the secret.
Parent Topic: Managing secrets in Kubernetes