<p>While trying to setup Helm for my cluster I declared the cluster-admin role which caused the overwriting of the default cluster-admin role. Now I don't have it in my cluster anymore. How can I fix this?</p>

Erokos
<p>You can create a new one with the following yaml:</p>

<p><strong>cluster-admin.yaml</strong>:</p>

<pre class="lang-yaml prettyprint-override"><code>apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
    rbac.authorization.kubernetes.io/autoupdate: "true"
  labels:
    kubernetes.io/bootstrapping: rbac-defaults
  name: cluster-admin
rules:
- apiGroups:
  - '*'
  resources:
  - '*'
  verbs:
  - '*'
- nonResourceURLs:
  - '*'
  verbs:
  - '*'
</code></pre>

<p>Create clusterRole:</p>

<pre><code>$ kubectl apply -f cluster-admin.yaml
</code></pre>

<p>N.B.:</p>

<ul>
<li><p><code>rbac.authorization.kubernetes.io/autoupdate: "true"</code> is given for <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#auto-reconciliation" rel="nofollow noreferrer">Auto-reconciliation</a>.</p></li>
<li><p><code>kubernetes.io/bootstrapping: rbac-defaults</code> is added by the API server. This label is used to represent <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings" rel="nofollow noreferrer">Default roles and role bindings</a>.  </p></li>
</ul>
