Elastic Agent doesn't resolve nodename

I followed to Example: Install Fleet-managed Elastic Agent on Kubernetes using Helm guide and deployed elastic agents on my k8s cluster. But agents statuses are unhealthy, and logs shows the following error

Error fetching data for metricset kubernetes.volume: error doing HTTP request to fetch 'volume' Metricset data: error making http request: Get \"https://main-cluster-dev-default-b45be-bynlj:10250/stats/summary\": lookup main-cluster-dev-default-b45be-bynlj on 10.96.0.10:53: no such host

The problem is not available in the main branch of the elastic-agent, but guide suggests to use 8.16 branch.