Created
January 9, 2020 08:43
-
-
Save ykyuen/f733f6777220c2a486378d010741ab0e to your computer and use it in GitHub Desktop.
monitor-k8s-cluster-by-running-boatswain-as-a-daemonset-01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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