Viewing secrets

The get command can be used to list secrets and view their contents.

About this task

Procedure

  1. To view a list of all secrets, run the following command.
    kubectl get secrets
    If a namepace is beign used, the -n argument must be inclued.
    kubectl get secrets -n namespace_name
    where namespace_name is the name of the namespace.
  2. To view the content of a secret, run the following command.
     kubectl describe secret secret_name
    where secret_name is the name of the secret.