Skip to content

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

Merged
blakerouse merged 3 commits intoelastic:masterfrom
IzekChen:IzekChen-patch-1
Feb 1, 2020
Merged

[bug] add replicasets.apps to ClusterRole to avoid permission issue#15741
blakerouse merged 3 commits intoelastic:masterfrom
IzekChen:IzekChen-patch-1

Conversation

@IzekChen
Copy link
Copy Markdown
Contributor

  • Bug

Logs
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
Why is it important?
You need this permission to make metricbeat work properly. Otherwise, it won't work

IzekChen and others added 3 commits January 20, 2020 17:28
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
@elasticmachine
Copy link
Copy Markdown
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link
Copy Markdown
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Copy link
Copy Markdown
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing some testing with Kubernetes 1.17 with metricbeats and hit the same issue. This solves it.

@blakerouse blakerouse merged commit 86e21f5 into elastic:master Feb 1, 2020
@blakerouse blakerouse added bug needs_backport PR is waiting to be backported to other branches. Team:Platforms Label for the Integrations - Platforms team labels Feb 1, 2020
@jsoriano jsoriano removed the needs_backport PR is waiting to be backported to other branches. label Oct 16, 2020
jsoriano pushed a commit to jsoriano/beats that referenced this pull request Oct 16, 2020
…c#15741)

* 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)
jsoriano pushed a commit to jsoriano/beats that referenced this pull request Oct 16, 2020
…c#15741)

* 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)
jsoriano added a commit that referenced this pull request Oct 16, 2020
#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 <mz00000102@gmail.com>
jsoriano added a commit that referenced this pull request Oct 16, 2020
#21892)

* 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 <mz00000102@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Team:Platforms Label for the Integrations - Platforms team v7.10.0 v7.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants