concept
Authorization diagnostics
Diagnose access failures using request attributes, authorization reviews and narrowly scoped permission changes. An HTTP 401 commonly means that the presented credentials were not accepted; anonymous access can complicate missing-credential cases.
Formal Syntax & Structure
kubernetes syntaxkubernetes
kubectl auth can-i get pods/NAME --subresource=logWorking Example
Example Snippetkubernetes
kubectl --kubeconfig ./approved-lab.kubeconfig --context book-lab-reader -n book-lab auth can-i get pods/catalog-demokubectl --kubeconfig ./approved-lab.kubeconfig --context book-lab-reader -n book-lab auth can-i get pods/catalog-demo --subresource=log