Skip to content

Commit

Permalink
Add replicasets.apps to ClusterRole to avoid permission issue (elasti…
Browse files Browse the repository at this point in the history
…c#15741) (elastic#21891)

* add replicasets.apps to avoid permission error

Error message:
E0120 09:24:12.769663       1 reflector.go:125] github.com/elastic/beats/libbeat/common/kubernetes/watcher.go:235: Failed to list *v1beta1.ReplicaSet: replicasets.apps is forbidden: User "system:serviceaccount:kube-system:metricbeat" cannot list resource "replicasets" in API group "apps" at the cluster scope

Fixed after add the permission

* recreate metricbeat-kubernetes.yaml file

* [bug] add replicasets.apps to ClusterRole to avoid permission issue

(cherry picked from commit 86e21f5)

Co-authored-by: Izek Chen <[email protected]>
  • Loading branch information
jsoriano and IzekChen authored Oct 16, 2020
1 parent ef85f4d commit 178002a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy/kubernetes/metricbeat-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ rules:
resources:
- statefulsets
- deployments
- replicasets
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
Expand Down
1 change: 1 addition & 0 deletions deploy/kubernetes/metricbeat/metricbeat-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rules:
resources:
- statefulsets
- deployments
- replicasets
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
Expand Down

0 comments on commit 178002a

Please sign in to comment.