diff --git a/kubernetes/node-max-map-count.yaml b/kubernetes/node-max-map-count.yaml index c9ca45c..b478a63 100644 --- a/kubernetes/node-max-map-count.yaml +++ b/kubernetes/node-max-map-count.yaml @@ -4,29 +4,25 @@ metadata: name: vm-max-map-count namespace: kube-system labels: - k8s-app: vm-max-map-count + app: vm-max-map-count spec: selector: matchLabels: - name: vm-max-map-count + app: vm-max-map-count template: metadata: labels: - name: vm-max-map-count + app: vm-max-map-count spec: hostPID: true - containers: + initContainers: - name: vm-max-map-count - image: gcr.io/google-containers/startup-script:v1 + image: ubuntu:20.04 imagePullPolicy: Always securityContext: privileged: true - env: - - name: STARTUP_SCRIPT - value: | - #! /bin/bash - sleep 5 - while true; do - sysctl -w vm.max_map_count=262144 - sleep 300 - done \ No newline at end of file + command: ["/bin/bash", "-c"] + args: ["sysctl -w vm.max_map_count=262144"] + containers: + - name: pause + image: gcr.io/google_containers/pause:3.2 \ No newline at end of file