Solution to clusterrole in lab kubernetes challenge 1

What am I doing wrong in trying to create the role in kubernetes here:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: developer-role
  namespace: development
  labels:
    rbac.example.com/aggregate-to-monitoring: "true"
rules:
- apiGroups: [""]
  resources: ["services", "pods", "persistentvolumeclaims"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

Hi @minaf1,

  • You need to create a Role not a Cluster Role
  • On verbs, you don’t need to list all the verbs, you can just use
    [ “*” ]

PS : For the challenge, no need to add labels

Regard