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.

Revisions

  1. ykyuen created this gist Jan 9, 2020.
    38 changes: 38 additions & 0 deletions daemon-set.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    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>