I want to check whether the all labels/annotations in a set of secrets have been changed. Unfortunately the key to check has a hyphen in it and I have no idea how to access it.
I tried:
kubectl get secret -o custom-columns=NAME:metadata.name,ANNOTATIONS:metadata.annotations['k8s.key/with-hyphen']
kubectl get secret -o go-template --template='{{ range .items }}{{ .metadata.annotations['k8s.key/with-hyhen'] }}{{ end }}'
kubectl get secret -o custom-columns=NAME:metadata.name,ANNOTATIONS:metadata.annotations."k8s.key/with-hyphen"
kubectl get secret -o custom-columns=NAME:metadata.name,ANNOTATIONS:metadata.annotations.k8s.key/with-hyphen