Skip to content

Instantly share code, notes, and snippets.

@megastef
Last active February 15, 2016 11:22
Show Gist options
  • Save megastef/13bae0058b5e8575ff26 to your computer and use it in GitHub Desktop.
Save megastef/13bae0058b5e8575ff26 to your computer and use it in GitHub Desktop.
DaemonSet for Kubernetes to get all docker logs and metrics with Sematext Docker Agent
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: sematext-agent
spec:
template:
metadata:
labels:
app: sematext-agent
spec:
dnsPolicy: "ClusterFirst"
restartPolicy: "Always"
containers:
- name: sematext
image: sematext/sematext-agent-docker:latest
imagePullPolicy: "Always"
env:
- name: SPM_TOKEN
value: "YOUR_SPM_TOKEN"
- name: LOGSENE_TOKEN
value: "YOUR_LOGSENE_TOKEN"
- name: KUBERNETES
value: 1
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
- mountPath: /etc/localtime
name: localtime
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
- name: localtime
hostPath:
path: /etc/localtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment