<p>My objective is to run the following command:</p>

<pre><code>sudo pachctl deploy google ${BUCKET_NAME} ${STORAGE_SIZE} --dynamic-etcd-nodes=1
</code></pre>

<p>I face an error about permissions that I have(posted at last). So, I wanted to create my role via the following command:</p>

<pre><code>sudo kubectl create clusterrolebinding aviralsrivastava-cluster-admin-binding --clusterrole=cluster-admin --user=aviral@socialcops.com
</code></pre>

<p>However, the above command is yielding me an error:</p>

<pre><code>Error from server (Forbidden): clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "aviral@socialcops.com" cannot create clusterrolebindings.rbac.authorization.k8s.io at the cluster scope: Required "container.clusterRoleBindings.create" permission.
</code></pre>

<p>You need to apply following RBAC permission as a <code>cluster-admin</code> to provide permission to user <code>aviral@socialcops.com</code> for creating clusterRole and clusterRoleBinding:</p>

<p>ClusterRole.yaml</p>

<pre><code>apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: prom-admin
rules:
# Just an example, feel free to change it
- apiGroups: [""]
  resources: ["clusterRole", "clusterRoleBinding"]
  verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
</code></pre>

<p>ClusterRoleBinding.yaml</p>

<pre><code>apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: prom-rbac
subjects:
- kind: User
  name: aviral@socialcops.com
roleRef:
  kind: ClusterRole
  name: prom-admin
  apiGroup: rbac.authorization.k8s.io
</code></pre>
