kubectl get rolebinding,clusterrolebinding --all-namespaces -o jsonpath='{range .items[?(@.subjects[0].name=="SERVICE_ACCOUNT_NAME")]}[{.roleRef.kind},{.roleRef.name}]{end}'
Created
June 19, 2023 03:41
-
-
Save zulhfreelancer/f50fb364600e80dd1ade16b4c87b4923 to your computer and use it in GitHub Desktop.
How to find Kubernetes Role or ClusterRole linked to a specific ServiceAccount?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment