RoleBinding grants Role permissions to Users or ServiceAccounts. This validator detects when a Role used in RoleBinding is not found.
Affected Resources: RoleBinding, ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: read-pods
subjects:
- kind: ServiceAccount
name: backend
roleRef:
kind: Role
name: pod-reader # Role not found
apiGroup: rbac.authorization.k8s.io
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: podreader # Name different
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.