Skip to content

Instantly share code, notes, and snippets.

@spy86
Last active February 5, 2023 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spy86/022b3a8cdc0c65b1263396b5ed215a17 to your computer and use it in GitHub Desktop.
Save spy86/022b3a8cdc0c65b1263396b5ed215a17 to your computer and use it in GitHub Desktop.
Change kernel parameters
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: example
namespace: kube-system
labels:
app: example
spec:
template:
metadata:
labels:
name: example
spec:
hostNetwork: true
hostPID: true
hostIPC: true
initContainers:
- command:
- sh
- -c
- sysctl -w fs.inotify.max_user_watches=524288;
image: alpine:3.6
imagePullPolicy: IfNotPresent
name: sysctl
resources: {}
securityContext:
privileged: true
volumeMounts:
- name: sys
mountPath: /sys
containers:
- resources:
requests:
cpu: 0.01
image: alpine:3.6
name: sleepforever
command: ["tail"]
args: ["-f", "/dev/null"]
volumes:
- name: sys
hostPath:
path: /sys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment