kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: lease-access
rules:
  - apiGroups: ["akka.io"]
    resources: ["leases"]
    verbs: ["get", "create", "update", "delete", "list"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: lease-access
subjects:
  # Uses the default service account.
  # Consider creating a dedicated service account to run your
  # Apache Pekko Cluster services and binding the role to that one.
  - kind: ServiceAccount
    name: default
roleRef:
  kind: Role
  name: lease-access
  apiGroup: rbac.authorization.k8s.io
