<p>I am trying to find a way? If I create a new namespace then I want it to create a RBAC rule for that serviceaccount automatically.</p>
<p>I know one way is to create an operator so, that there is an event that is traced by reconciler / api server and it creates the resources based on CRD's. Is there any other way?</p>

Manmohan Rawat
<p>While not really intended for this kind of thing you could use admission controllers (<a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/</a>) to achieve something like that.</p>
<p>Due to it's nature the admission controller is called before the namespace exists and you would need to wait until its creation is finished to create objects within that namespace. For that the admission controller call needs to be completed, else the namespace can't be created. I.e. by calling a second service that waits until the namespace is actually created.</p>
