apiVersion: apps/v1 kind: DaemonSet metadata: name: longhorn-amazonlinux-init namespace: longhorn-system labels: app: longhorn-amazonlinux-init annotations: command: &cmd yum install iscsi-initiator-utils -y && sudo systemctl enable iscsid && sudo systemctl start iscsid spec: selector: matchLabels: app: longhorn-amazonlinux-init template: metadata: labels: app: longhorn-amazonlinux-init spec: hostNetwork: true initContainers: - name: init-node command: - nsenter - --mount=/proc/1/ns/mnt - -- - sh - -c - *cmd image: alpine:3.7 securityContext: privileged: true hostPID: true containers: - name: wait image: k8s.gcr.io/pause:3.1 hostPID: true hostNetwork: true tolerations: # Execute deamonset all nodes - operator: "Exists" updateStrategy: type: RollingUpdate