Hey hi team, can we bind clusterrole and service account with normal rolebinding . . .

khasim_soudagar:
hey hi team, can we bind clusterrole and service account with normal rolebinding ? or we must use clusterrolebinding only ??

vazudew:
clusterrole and clusterrolebinding together

khasim_soudagar:
yes @vazudew, my doubt is can we do cross binding ?

vazudew:
oh not sure buddy…

Sri:
@khasim_soudagar yes, we can bind clusterrole to rolebinding

khasim_soudagar:
thank u @Sri

lagisetti sambasiva rao:
@khasim_soudagar Yes, looks like thats possible based on the below info from kubernetes documentation .

lagisetti sambasiva rao:
Within the namespace “acme”, grant the permissions in the “view” ClusterRole to the service account in the namespace “acme” named “myapp”:

lagisetti sambasiva rao:
• kubectl create rolebinding myapp-view-binding --clusterrole=view --serviceaccount=acme:myapp --namespace=acme