Skip to content

Instantly share code, notes, and snippets.

@dfrancolr
Created July 22, 2020 19:26
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dfrancolr/fd83498f92231501a8f075e8d1769da1 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
name: startup
name: startup
namespace: default
spec:
selector:
matchLabels:
name: startup
template:
metadata:
labels:
name: startup
spec:
containers:
- name: startup
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
# Increase max open pseudo terminals to avoid the following error when using shell to connect on containers:
# 'starting container process caused "open /dev/ptmx: no space left on device": unknown'
sysctl -w kernel.pty.max=8192
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment