Kubernetes monitoring combines resource usage, pod status, and container logs from across a cluster. The Kubernetes integration collects that data through Fleet-managed Elastic Agent Pods so it can be searched and viewed in Kibana.
Fleet Server distributes the integration settings to the agents assigned to the selected policy. Agents in a DaemonSet collect node-level data, while an elected leader collects cluster-wide information such as events and object states from kube-state-metrics.
The starting point is a dedicated Kubernetes agent policy with agents already enrolled inside the cluster and kube-state-metrics deployed alongside them. The default collection settings fit this arrangement; scheduler and controller-manager metrics remain disabled because managed Kubernetes services may not expose those endpoints.
Steps to add Kubernetes integration to Elastic Agent with Fleet:
- Confirm the Elastic Agent Pods are running in the cluster's agent namespace.
$ kubectl get pods -n default NAME READY STATUS RESTARTS AGE agent-pernode-monitoring-kss6v 1/1 Running 0 82s kube-state-metrics-5fc7574ffd-z268f 1/1 Running 0 3m4s
The namespace here is default, as with the standard Helm installation. If your agents use another namespace, substitute it in both Kubernetes commands. An enrolled agent should already appear as Healthy in Fleet. Kubernetes deployment and enrollment are prerequisites, covered by Elastic's Kubernetes deployment instructions.
- Check the kube-state-metrics service in the same namespace.
$ kubectl get service kube-state-metrics -n default NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kube-state-metrics ClusterIP 10.96.163.204 <none> 8080/TCP 3m5s
The integration's state datasets use kube-state-metrics:8080 by default. If your service has another name or namespace, its service DNS name belongs in each enabled state dataset's Hosts field under Collect Kubernetes metrics from kube-state-metrics → Change defaults.
- Search for Integrations in Kibana's global search.

- Select Integrations from the search results.

- Search for Kubernetes in the integrations catalog.

- Open the Kubernetes integration card.
The Kubernetes integration collects logs and metrics; the separately listed Kubernetes Security Posture Management integration has a different purpose.
- Click Add Kubernetes.

- Set Integration name to a recognizable name such as kubernetes-monitoring.
The default enabled inputs collect kubelet metrics, object states, API server metrics, events, proxy metrics, and container logs. The data stream namespace inherits the agent policy's namespace unless overridden in the integration's Advanced options; it is separate from a Kubernetes namespace.
- Select Existing hosts under Where to add this integration?.

- Choose the policy assigned to the Kubernetes agents from Agent policies.
Saving applies collection to every agent on the selected policy, including container logs that may contain confidential application data. The default Kubelet inputs also skip server-certificate verification, which can expose the Kubernetes bearer token to an impersonated endpoint. A deployment requiring authenticated kubelet connections needs trusted serving certificates, a configured CA, and full verification in the Kubelet input settings before rollout. Removing the integration from the policy stops its collection but does not erase documents already indexed.
- Save the integration to the selected agent policy.
The bottom-right button is labeled Save and continue.
- Deploy the policy update from the confirmation dialog.
The Save and deploy changes button confirms the policy and affected agent count shown in the dialog. Fleet sends the updated policy to those agents without another installation.
- Open the Assets tab on the Kubernetes integration page.

- Open the [Metrics Kubernetes] Pods dashboard from the assets list.

- Confirm Status per Pod lists Pods from your cluster within the current time range.
The Phase and Ready columns show the collected pod states; an empty dashboard does not confirm collection. New data may take a few collection periods to arrive. If it stays empty, agent health, the selected policy, and kube-state-metrics reachability are the first places to check.
Related: How to monitor Elastic Agent health in Fleet