I am using this official helm chart for filebeat:
https://artifacthub.io/packages/helm/elastic/filebeat
I have my own filebeat module on my system like:
- module
- _meta
- fields.yaml
- error_logs
- config
-log.yaml
This is not the exact structure. Just giving you an idea of the nested nature of it.
Now how do I mount this onto filebeats as a configmap?
I tried just doing:
kubectl create configmap filebeats-module --from-file filebeats-module/
but the resulting configmap doesn't look right:
apiVersion: v1
data:
module.yml: |+
dashboards:
kind: ConfigMap
metadata:
creationTimestamp: "2021-01-12T15:56:13Z"
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
.: {}
f:module.yml: {}
manager: kubectl-create
operation: Update
time: "2021-01-12T15:56:13Z"
name: filebeats-module
namespace: logging
resourceVersion: "10611775"
selfLink: /api/v1/namespaces/logging/configmaps/filebeats-module
uid: 8a6e9309-b34d-4399-8386-ad02a5f25fa3
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…