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:
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 .
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