# Kubernetes Module of Metricbeat does not get metrics \[7.9.2 with Kubernetes 1.21.1\]

**URL:** https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-metrics-7-9-2-with-kubernetes-1-21-1/272996
**Category:** Beats
**Tags:** docker, metricbeat
**Created:** [May 14, 2021, 8:45am UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-metrics-7-9-2-with-kubernetes-1-21-1/272996 "2021-05-14T08:45:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)
#### Post date: [May 14, 2021, 8:45am UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-metrics-7-9-2-with-kubernetes-1-21-1/272996/1 "2021-05-14T08:45:28Z")

</div>

Hi, everyone

I have been testing with a new version of **Kubernetes** , in this case, **1.21.1**. I use **Metricbeat** in order to get metrics of **containers** , **pods** and **nodes**.

Here you are my config:

```auto
apiVersion: v1
kind: ConfigMap
metadata:
  name: metricbeat-kubernetes-config
  namespace: kube-system
  labels:
    k8s-app: metricbeat-kubernetes
data:
  metricbeat.yml: |-
    metricbeat.modules:
    - module: kubernetes
      metricsets:
        - node
        - pod
        - container
      period: 1m
      hosts: ["https://localhost:10250"]
      host: ${NODE_NAME}
      add_metadata: true
      bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
      ssl.verification_mode: none
      ssl.certificate_authorities:
       - /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    logging.level: warning
    output.kafka:
     hosts: ['${KAFKA_HOST}:${KAFKA_PORT}']
     topic: <kafka-topic>
     client_id: <kafka-client-id>

```

With **Kubernetes 1.20.6** , I have not any issue. Nevertheless, with **Kubernetes 1.21.1**  **Metricbeat is not be able to get metrics**. I have found a **issue** on **Kubernetes** which talks about remove metrics on **Kubelet** : [Issue #68522](https://github.com/kubernetes/kubernetes/issues/68522).

Is there any **workaround**? Will **Metricbeat** get metrics for **new Kubernetes versions**?

Thanks in advance,

Rodrigo

👀 I have just created an **issue** on **GitHub** : [Issue #25801](https://github.com/elastic/beats/issues/25801)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 11, 2021, 8:46am UTC](https://discuss.elastic.co/t/kubernetes-module-of-metricbeat-does-not-get-metrics-7-9-2-with-kubernetes-1-21-1/272996/2 "2021-06-11T08:46:28Z")

</div>

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