How to set label on secret created by ServiceAccount?

Viewed 112

Is there any way to set label on secret created by ServiceAccount? For now it is the only secret I'm not able to configure with label.

apiVersion: v1
kind: ServiceAccount
metadata:
  name: forum-sa

enter image description here

2 Answers

Please use the below configuration using the service account with kubectl,Follow the documentation1

kubectl get secret --namespace={namespace}

By using above kubectl command which will help to set label namespace for secrets.

Related