Deploying elastic agent container in kubernetes: error retrieving resource lock

When I deploy an elastic agent image I see this repeated error in the container logs.
error retrieving resource lock default/elastic-agent-cluster-leader: leases.coordination.k8s.io "elastic-agent-cluster-leader" is forbidden: User "system:serviceaccount:default:default" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "default"

Agent enrollment is successful and I can manage the agent from our fleet cluster and I can still receive logs and metrics.

This agent is not intended to monitor our internal k8s infrastructure. Can these logs be ignored? Is there any way to disable these logs? What are the implications of deploying the agent in this manner.

Alternatively, I have deployed the agent with a ClusterRole, ClusterRoleBinding, and ServiceAccount and the error log is no longer present - so I'm curious what I am missing if I go with the first deployment method.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.