Skip to content

Commit

Permalink
Add pod example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
ApsOps committed May 16, 2016
1 parent 1726761 commit d93f2f1
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```
Expand Down

0 comments on commit d93f2f1

Please sign in to comment.