Filebeats deployed inside kubernetes can fetch logs from host containers? (containers outside k8s)

I have a filebeats deployed inside kubernetes cluster. I want fetch logs from containers running in k8s node hosts but deployed outside kubernetes.

I have the standard filebeats config for kubernetes where it should fetch logs from all containers id.

apiVersion: v1
kind: ConfigMap
metadata:
  name: filebeat-inputs
  namespace: kube-system
  labels:
    k8s-app: filebeat
data:
  kubernetes.yml: |-
    - type: docker
      containers.ids:
      - "*"
      processors:
        - add_kubernetes_metadata:
            in_cluster: true

It is possible fetch that container logs?

Thanks!

I've added /var/run/docker.sock on mountPaths and also add_docker_metadata in filebeats-input file.

Now i can see all containers.

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