mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #130990 from BenTheElder/inotify-watches-kube-up
kube-up.sh: set inotify limits
This commit is contained in:
commit
9a8c2a9fa3
@ -66,6 +66,24 @@ function setup-os-params {
|
|||||||
# /sbin/crash_reporter which is more restrictive in saving crash dumps. So for
|
# /sbin/crash_reporter which is more restrictive in saving crash dumps. So for
|
||||||
# now, set a generic core_pattern that users can work with.
|
# now, set a generic core_pattern that users can work with.
|
||||||
echo "/core.%e.%p.%t" > /proc/sys/kernel/core_pattern
|
echo "/core.%e.%p.%t" > /proc/sys/kernel/core_pattern
|
||||||
|
echo "Default max_user_watches / max_user_instances:"
|
||||||
|
# ensure we have enough inotify watches for many pods, versus the OS defaults
|
||||||
|
# debug before & after / defaults for comparison
|
||||||
|
sysctl fs.inotify.max_user_watches
|
||||||
|
sysctl fs.inotify.max_user_instances
|
||||||
|
cat <<EOF > /etc/sysctl.d/inotify.conf
|
||||||
|
fs.inotify.max_user_watches=65536
|
||||||
|
fs.inotify.max_user_instances=8192
|
||||||
|
EOF
|
||||||
|
# Ubuntu vs COS, load sysctl settings now
|
||||||
|
if [[ -e "/usr/lib/systemd/systemd-sysctl" ]]; then
|
||||||
|
/usr/lib/systemd/systemd-sysctl
|
||||||
|
else
|
||||||
|
/lib/systemd/systemd-sysctl
|
||||||
|
fi
|
||||||
|
echo "Updated max_user_watches / max_user_instances:"
|
||||||
|
sysctl fs.inotify.max_user_watches
|
||||||
|
sysctl fs.inotify.max_user_instances
|
||||||
}
|
}
|
||||||
|
|
||||||
# secure_random generates a secure random string of bytes. This function accepts
|
# secure_random generates a secure random string of bytes. This function accepts
|
||||||
|
Loading…
Reference in New Issue
Block a user