Skip to content

Instantly share code, notes, and snippets.

@gambtho
Last active December 21, 2021 17:35
Show Gist options
  • Save gambtho/645d549753bacaf1106e40925802d044 to your computer and use it in GitHub Desktop.
Save gambtho/645d549753bacaf1106e40925802d044 to your computer and use it in GitHub Desktop.
daemonset aks set pid_max
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: kube-system
name: set-pid-max
labels:
k8s-app: set-pid-max
spec:
selector:
matchLabels:
k8s-app: set-pid-max
template:
metadata:
labels:
k8s-app: set-pid-max
spec:
initContainers:
- name: set-pid-max
image: mcr.microsoft.com/oss/busybox/busybox:1.33.1
command: ["sh", "-c"]
securityContext:
privileged: true
args:
- |-
set -e
set -o pipefail
echo 4194269 > /proc/sys/kernel/pid_max
containers:
- name: wait
image: mcr.microsoft.com/oss/kubernetes/pause:3.6
imagePullPolicy: IfNotPresent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment