<p>I want to add specific users to a namespace. Where they have full admin access to only those namespaces.
Sample yamls:</p>
<pre><code>kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: ns1-full-access
  namespace: ns1
rules:
- apiGroups: [&quot;&quot;]
  resources: [&quot;*&quot;]
  verbs: [&quot;*&quot;]
- apiGroups: [&quot;extensions&quot;]
  resources: [&quot;*&quot;]
  verbs: [&quot;*&quot;]

---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ns1-full-access-rolebinding
  namespace: ns1
subjects:
- kind: Group
  name: ns1-full-access-admins
  apiGroup: rbac.authorization.k8s.io
roleRef:
  kind: Role
  name: ns1-full-access
  apiGroup: rbac.authorization.k8s.io
subjects:
    - apiGroup: rbac.authorization.k8s.io
      kind: User
      name: XYZ@test.com
    - apiGroup: rbac.authorization.k8s.io
      kind: User
      name: XYZ1@test.com
</code></pre>
<p>Will this be sufficient.</p>

Vrushali
<p>yes it will work</p>
<p>basic example change the <strong>apiGroups</strong> as  per need or else use *****</p>
<pre><code>---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: mynamespace-user
  namespace: mynamespace

---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: mynamespace-user-full-access
  namespace: mynamespace
rules:
- apiGroups: [&quot;&quot;, &quot;extensions&quot;, &quot;apps&quot;]
  resources: [&quot;*&quot;]
  verbs: [&quot;*&quot;]
- apiGroups: [&quot;batch&quot;]
  resources:
  - jobs
  - cronjobs
  verbs: [&quot;*&quot;]

---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: mynamespace-user-view
  namespace: mynamespace
subjects:
- kind: ServiceAccount
  name: mynamespace-user
  namespace: mynamespace
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: mynamespace-user-full-access
</code></pre>
