mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 17:49:59 +00:00
The symptom is: create fsnotify watcher: too many open files (When trying to follow logs with e.g. kubectl logs or stern.) I think this is a kubelet resource issue so the sysctl needs to be adjusted on every node - hence a DaemonSet.
28 lines
505 B
YAML
28 lines
505 B
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: sysctl
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: sysctl
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: sysctl
|
|
spec:
|
|
tolerations:
|
|
- operator: Exists
|
|
initContainers:
|
|
- name: sysctl
|
|
image: alpine
|
|
securityContext:
|
|
privileged: true
|
|
command:
|
|
- sysctl
|
|
- fs.inotify.max_user_instances=99999
|
|
containers:
|
|
- name: pause
|
|
image: registry.k8s.io/pause:3.8
|
|
|