Hi!
I'm trying to use Filebeat on my aws eks to get my containers logs.
filebeat-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: elk
data:
filebeat.yml: |-
logging.level: debug
filebeat.inputs:
- type: docker
containers.ids:
- "*"
processors:
- add_kubernetes_metadata:
in_cluster: true
namespace: "crm" # Substitua com o namespace desejado
output.console:
pretty: true
filebeat-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: filebeat
namespace: elk
spec:
replicas: 1
selector:
matchLabels:
app: filebeat
template:
metadata:
labels:
app: filebeat
spec:
containers:
- name: filebeat
image: docker.elastic.co/beats/filebeat:7.10.0
volumeMounts:
- name: config
mountPath: /usr/share/filebeat/filebeat.yml
subPath: filebeat.yml
readOnly: true
volumes:
- name: config
configMap:
name: filebeat-config
Can someone help me? When I've opened the Filebeat logs, it's showing that localize crm pods, but doest not getting log from stdout
2024-01-04T17:09:34.882Z DEBUG [kubernetes] add_kubernetes_metadata/kubernetes.go:182 Adding kubernetes pod: crm/crm-base-578f9cc95f-q6htb {"libbeat.processor": "add_kubernetes_metadata"}
2024-01-04T17:09:34.882Z DEBUG [kubernetes] add_kubernetes_metadata/kubernetes.go:258 Created index 80cb8c9adf3b33dee263270b36ab4adf873f3824483d7c86b958edf27f4ff3df for pod crm/crm-base-578f9cc95f-q6htb {"libbeat.processor": "add_kubernetes_metadata"}
2024-01-04T17:09:34.882Z DEBUG [kubernetes] add_kubernetes_metadata/kubernetes.go:182 Adding kubernetes pod: crm/crm-base-externo-7cdd9b64d7-4nqll {"libbeat.processor": "add_kubernetes_metadata"}
2024-01-04T17:09:34.882Z DEBUG [kubernetes] add_kubernetes_metadata/kubernetes.go:258 Created index 768b64af7f5b466bc4b7c6cf0c5374ea4dc359ef73e63dd0a0907ff1029d8dfc for pod crm/crm-base-externo-7cdd9b64d7-4nqll {"libbeat.processor": "add_kubernetes_metadata"}