Skip to content

Instantly share code, notes, and snippets.

@ykyuen
Created January 9, 2020 08:43
Show Gist options
  • Save ykyuen/f733f6777220c2a486378d010741ab0e to your computer and use it in GitHub Desktop.
Save ykyuen/f733f6777220c2a486378d010741ab0e to your computer and use it in GitHub Desktop.
monitor-k8s-cluster-by-running-boatswain-as-a-daemonset-01
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: boatswain
namespace: boatswain
spec:
selector:
matchLabels:
name: boatswain
template:
metadata:
labels:
name: boatswain
spec:
containers:
- name: boatswain
image: boatswainio/boatswain:<latest or tag>
env:
- name: BOATSWAIN_TOKEN
valueFrom:
secretKeyRef:
name: boatswain
key: token
securityContext:
capabilities:
add: ["NET_ADMIN"]
volumeMounts:
- name: dockersock
mountPath: "/var/run/docker.sock"
volumes:
- name: dockersock
hostPath:
path: /var/run/docker.sock
hostNetwork: true
hostPID: true
restartPolicy: Always
nodeSelector:
kubernetes.io/hostname: <hostname of the selected node>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment