Adding the role and role bindings to Kube namespace

Hello,
Need to ask a query regarding Kubernetes RBAC.
Our CI/CD deploys Kong ingress controller in the separate namespace. Currently, its failing because we haven’t added the role and role binding in that namespace. Which one is the good approach in such case

  1. Cluster role + Cluster role binding
  2. Cluster role + role binding
  3. Role + role binding

If you need to reuse permissions then ClisterRole+RoleBinding is your best option

Got it… Ya here we have to reuse the permissions ci/cd across all the namespaces

So we can have cluster role and need to deploy in whichever namespace we can add role binding… Am I correct?

No, one ClusterRole (not a namespaced object). Then each namespace gets a RoleBinding. In your roleRef include 'kind: ClusterRole`

got it… Thank you so much :slightly_smiling_face: