apiVersion: rbac.authorization.k8s.io/v1
# This role binding allows "myserviceaccount" to read pods in the "default" namespace.
kind: RoleBinding
metadata:
  name: myrole-myserviceaccount
  namespace: default
subjects:
- kind: ServiceAccount 
  name: myserviceaccount
roleRef:
  kind: Role
  name: myrole
  apiGroup: rbac.authorization.k8s.io