<p>We are trying to start <a href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-reference-yml.html" rel="nofollow noreferrer">metricbeat</a> on typhoon kubernetes cluster. But after startup its not able to get some pod specific events like restart etc because of the following</p>
<h3>Corresponding metricbeat.yaml snippet</h3>
<pre class="lang-yaml prettyprint-override"><code># State metrics from kube-state-metrics service:
    - module: kubernetes
      enabled: true
      metricsets:
        - state_node
        - state_deployment
        - state_replicaset
        - state_statefulset
        - state_pod
        - state_container
        - state_cronjob
        - state_resourcequota
        - state_service
        - state_persistentvolume
        - state_persistentvolumeclaim
        - state_storageclass
        # Uncomment this to get k8s events:
        #- event  period: 10s
      hosts: [&quot;kube-state-metrics:8080&quot;]
</code></pre>
<h3>Error which we are facing</h3>
<pre class="lang-sh prettyprint-override"><code>2020-07-01T10:31:02.486Z        ERROR   [kubernetes.state_statefulset]  state_statefulset/state_statefulset.go:97       error making http request: Get http://kube-state-metrics:8080/metrics: lookup kube-state-metrics on *.*.*.*:53: no such host
2020-07-01T10:31:02.611Z        WARN    [transport]     transport/tcp.go:52     DNS lookup failure &quot;kube-state-metrics&quot;: lookup kube-state-metrics on *.*.*.*:53: no such host
2020-07-01T10:31:02.611Z        INFO    module/wrapper.go:259   Error fetching data for metricset kubernetes.state_node: error doing HTTP request to fetch 'state_node' Metricset data: error making http request: Get http://kube-state-metrics:8080/metrics: lookup kube-state-metrics on *.*.*.*:53: no such host
2020-07-01T10:31:03.313Z        ERROR   process_summary/process_summary.go:102  Unknown or unexpected state &lt;P&gt; for process with pid 19
2020-07-01T10:31:03.313Z        ERROR   process_summary/process_summary.go:102  Unknown or unexpected state &lt;P&gt; for process with pid 20
</code></pre>
<p>I can add some other info which is required for this.</p>

codeaprendiz
<p>Make sure you have the Kube-State-Metrics deployed in your cluster in the kube-system namespace to make this work. Metricbeat will not come with this by default.</p>
<p>Please refer <a href="https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-kubernetes.html" rel="nofollow noreferrer">this</a> for detailed deployment instructions.</p>
