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
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
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.
Using the service account token with kubectl:
We can patch the secrets label with the required labels or we can also add the labels during secrets creation