我正在尝试使用 k8s 1.16 https://www.elastic.co/guide/en/beats/filebeat/7.4/running-on-kubernetes.html按照此文档在 minikube 上运行 FileBeat
我按照说明下载了清单文件
curl -L -O https://raw.githubusercontent.com/elastic/beats/7.4/deploy/kubernetes/filebeat-kubernetes.yaml
Run Code Online (Sandbox Code Playgroud)
下面的 yaml 文件的内容
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
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/"
# To enable hints based autodiscover, remove `filebeat.inputs` configuration and uncomment this:
#filebeat.autodiscover:
# providers:
# - type: kubernetes
# host: ${NODE_NAME}
# hints.enabled: true
# hints.default_config:
# type: container
# …Run Code Online (Sandbox Code Playgroud)