I am running a Kubernetes (v1.12.3) cluster and trying to use filebeat to get the data from docker containers. The logs works fine (for testing purpose I am sending it to just files), but there is no kubernetes metadata coming through. Here is my config, not sure what I am doing wrong.
Any help would be appreciated! Thank you!
filebeat.yaml
filebeat.config:
inputs:
# Mounted `filebeat-inputs` configmap:
path: /root/filebeat-6.5.4-linux-x86_64/inputs.d/*.yml
# Reload inputs configs as they change:
reload.enabled: false
modules:
path: /root/filebeat-6.5.4-linux-x86_64/modules.d/*.yml
# Reload module configs as they change:
reload.enabled: false
# To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this:
#filebeat.autodiscover:
# providers:
# - type: kubernetes
# hints.enabled: true
output.file:
path: "/tmp/filebeat"
filename: filebeat
#rotate_every_kb: 10000
#number_of_files: 7
#permissions: 0600
logging.level: debug
inputs.d/kubernetes.yml
- type: docker
containers.ids:
- "*"
json.keys_under_root: true
json.message_key: log
encoding: utf-8
document_type: docker
processors:
- add_kubernetes_metadata:
in_cluster: false
host: ${HOSTNAME}
namesapce: kube-system
default_indexers.enabled: true
default_matchers.enabled: true
include_pod_uid: true
kube_config: /root/admin.kubeconfig