kar*_*yan 3 permissions rbac kubernetes
kubectl是否有办法找出服务帐户绑定了哪些集群角色或角色?
You could do something like:
kubectl get rolebindings,clusterrolebindings \
--all-namespaces \
-o custom-columns='KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,SERVICE_ACCOUNTS:subjects[?(@.kind=="ServiceAccount")].name' | grep "<SERVICE_ACCOUNT_NAME>"
Run Code Online (Sandbox Code Playgroud)
Replace the grep with then name of the service account you are looking for.
| 归档时间: |
|
| 查看次数: |
221 次 |
| 最近记录: |