# Module: kubernetes
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.10/metricbeat-module-kubernetes.html

# Node metrics, from kubelet:
- module: kubernetes
  #metricsets:
  #  - node
  #  - system
  #  - pod
  #  - container
  #  - volume
  period: 10s
  hosts: ["localhost:10250"]
  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
  ssl.certificate_authorities:
    - /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
  #username: "user"
  #password: "secret"

  # Enriching parameters:
  #add_metadata: true
  #labels.dedot: true
  #annotations.dedot: true
  # When used outside the cluster:
  #host: node_name
  # If kube_config is not set, KUBECONFIG environment variable will be checked
  # and if not present it will fall back to InCluster
  #kube_config: ~/.kube/config

# State metrics from kube-state-metrics service:
#- module: kubernetes
#  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
#  period: 10s
#  hosts: ["kube-state-metrics:8080"]
#  add_metadata: true

# Kubernetes events
#- module: kubernetes
#  metricsets:
#    - event
