Using discovery.kubernetes Alloy pushes a lot of failed to create fsnotify watcher: too many open files

Kubernetes offer a way to change fs.inotify.max_user_watches.
See: Using sysctls in a Kubernetes Cluster | Kubernetes
Users could deploy a pod like so

apiVersion: v1
kind: Pod
metadata:
  name: sysctl-example
spec:
  securityContext:
    sysctls:
    - name: fs.inotify.max_user_watches
      value: "YOUR VALUE HERE"

There is a shortcut in the helm chart to do that, see .Values.global.podSecurityContext
As per:

1 Like