I am trying to do kubectl logs -f deployment/<my-deployment> -n <my-namespace>
but I am getting this error:
Found 3 pods, using pod/<pod-name>
Error from server (Forbidden): pods "<pod-name>" is forbidden: User "" cannot get resource "pods/log" in API group "" in the namespace "<my-namespace>"
what am i missing?
It seams that the kubectl is getting an empty user, but when I execute this command It tells me that everything is ok, but its not:
$ kubectl auth can-i get pods/log -n <my-namespace>
yes