<p>I have created a cluster role yaml(rbac.yaml) like this:</p>

<pre><code>kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: traefik-ingress-controller
rules:
  - apiGroups: [""]
    resources: ["services","endpoints","secrets"]
    verbs: ["get","list","watch"]
  - apiGroups: ["extensions"]
    resources: ["ingresses"]
    verbs: ["get","list","watch"]
</code></pre>

<p>Now I want to add a new apiGroups into the ClusterRole.</p>

<p>How to edit the ClusterRole and refresh? I search from kubernetes docs,but nothing to tell how to edit.what should I do to update the yaml?</p>

Dolphin
<p>You just need to modify the yaml and apply it again. Kubernetes API Server will take care of updating it into ETCD storage and it should take effect almost immediately.</p>

<p>You can also edit in directly via <code>kubectl edit clusterrole clustebrolename</code> but I don't recommend that because you loose the previous history. You should really be version controlling your yamls and apply the changes with <code>kubectl apply</code> </p>
