diff --git a/README.md b/README.md index f971ffd..37ca6ab 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,42 @@ LOGSTASH_HOSTS="'example.com:4083','example.com:4084'" LOG_LEVEL=info ``` +You should run a Kubernetes pod on every node. Example pod manifest: + +``` +apiVersion: v1 +kind: Pod +metadata: + name: filebeat + namespace: kube-system + labels: + k8s-app: filebeat +spec: + containers: + - name: filebeat + image: apsops/filebeat-kubernetes:v0.1 + resources: + limits: + memory: 200Mi + requests: + cpu: 100m + memory: 200Mi + env: + - name: LOGSTASH_HOSTS + value: "'myhost.com:5000'" + - name: LOG_LEVEL + value: info + volumeMounts: + - name: varlog + mountPath: /var/log/containers + readOnly: true + terminationGracePeriodSeconds: 30 + volumes: + - name: varlog + hostPath: + path: /var/log/containers +``` + Make sure you add a filter in your logstash configuration if you want to process the actual log lines. ```