0

I stumbled upon this command:

kubectl get secrets -n namespace-name

(Jay Beale, Attacking and Hardening Kubernetes | KringleCon 2020)

It seems to list the secrets for a specific namespace (here namespace-name). But I couldn't find any documentation about that (e.g. https://kubernetes.io/docs/concepts/configuration/secret/, https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get and googling it). Does anybody has some deeper insights about this?

secf00tprint
  • 202
  • 1
  • 11

1 Answers1

0

Found the solution. Searched at the wrong place:

-n is part of the core kubectl command:

https://kubernetes.io/docs/reference/kubectl/kubectl/

-n, --namespace string
If present, the namespace scope for this CLI request

So it shows the results for a given namespace if applied.

secf00tprint
  • 202
  • 1
  • 11