UNCLASSIFIED - NO CUI

Master Pod Fails to Start Due to vm.max_map_count

When deploying to a cloud environment such as GKE, you do not have access to modifying sysctl's. This pkg should consider including the following daemonset to configure the required vm.max_map_count sysctl:

cat <<EOF | kubectl apply -f -
apiVersion: apps/v1 
kind: DaemonSet
metadata:
  labels:
    name: es-ds
  name: es-ds
spec:
  selector:
    matchLabels:
      name: es-ds
  template:
    metadata:
      labels:
        name: es-ds
    spec:
      containers:
      - name: es-ds
        image: gcr.io/google-containers/startup-script:v1
        imagePullPolicy: IfNotPresent
        securityContext:
          privileged: true
        env:
        - name: STARTUP_SCRIPT
          value: |
            #! /bin/bash
            sysctl -w vm.max_map_count=262144
            echo "done"
EOF

xref: https://github.com/pires/kubernetes-elasticsearch-cluster/issues/85