How to config prometheus integration to scrape metrics from k8s pod

I'm using fleet-managed elastic agents installed in k8s. I want to scrape pod metrics by HTTP API. My current config is in the following picture:

But it does not work, any suggestions?

All registered providers are enabled by default, so I don't need to config k8s provider. But I don't know why there is no data at all...

Hi @Terran_Yiu, welcome to the Elastic community again. Have you enabled the kube-state-metrics ?

@ashishtiwari1993 No, but I believe that the kubelet endpoint's access permissions are sufficient to fetch pod information.

It might be helpful to include this tip in the documentation: it is necessary to install kube-state-metrics for Prometheus when using it in Kubernetes.

It is already mentioned in the Getting started doc. You can follow these steps.