daemonset: # Reference the Elasticsearch credentials secret # because filebeat need the credentials for accessing elasticsearch envFrom: - secretRef: name: elasticsearch-master-credentials filebeatConfig: filebeat.yml: | filebeat.inputs: - type: container paths: - /var/log/containers/*.log processors: - add_kubernetes_metadata: host: ${NODE_NAME} matchers: - logs_path: logs_path: "/var/log/containers/" output.elasticsearch: host: '${NODE_NAME}' hosts: 'elasticsearch-master:9200' username: '${ELASTICSEARCH_USERNAME}' password: '${ELASTICSEARCH_PASSWORD}' protocol: https ssl.certificate_authorities: - /usr/share/filebeat/config/certs/ca.crt secretMounts: - name: elastic-certificate-crt secretName: elasticsearch-master-certs path: /usr/share/filebeat/config/certs resources: limits: #This section describes the resource limits for the Filebeat container. #In this case, it's limiting the memory usage of the container to 300Mi to avoid out-of-memory errors. memory: "300Mi"