真题解析2
题目
Context
Task
解析
查询 SA test-sa-3 绑定的是哪个 Role(若没有可以直接 kubectl get role -n monitoring)
kubectl get rolebinding -n monitoring -o yaml | grep -i test-sa-3 -C 6
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: web-role
subjects:
- kind: ServiceAccount
name: test-sa-3
namespace: monitoring
kind: List
metadata:
resourceVersion: ""根据查询到的 Role ,编辑 Role 的权限
创建 role-2
创建 role-2-binding
Last updated