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?
You can create a new one with the following yaml:
cluster-admin.yaml:
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:
  - '*'Create clusterRole:
$ kubectl apply -f cluster-admin.yamlN.B.:
rbac.authorization.kubernetes.io/autoupdate: "true" is given for Auto-reconciliation.
kubernetes.io/bootstrapping: rbac-defaults is added by the API server. This label is used to represent Default roles and role bindings.