Last modified July 14, 2025

Kernel settings

We adjust some kernel settings of Flatcar Container Linux machines used as Kubernetes nodes to non-standard values. Here’s a complete reference. For information on other Linux kernel settings, please refer to the official documentation.

General performance and security settings

SettingValueDescription
kernel.kptr_restrict2Hide kernel pointers to mitigate the kernel’s attack surface.
kernel.panic10Reboot the system 10 seconds after a kernel panic.
kernel.panic_on_oops1Panic the kernel on oops to prevent an unstable state.
kernel.sysrq0Reduce the kernel’s attack surface.
net.ipv4.conf.all.arp_ignore1Harden SSH security.
net.ipv4.conf.all.arp_announce2Harden SSH security.
net.ipv4.conf.all.log_martians1Log all martian packets coming to existing network interfaces.
net.ipv4.conf.all.send_redirects0Don’t send redirects for IPv4.
net.ipv4.conf.default.accept_redirects0Don’t accept redirects for IPv4.
net.ipv4.conf.default.log_martians1Log all martian packets coming to freshly added network interfaces.
net.ipv4.tcp_congestion_controlbbrSet TCP congestion control to BBR for better performance.
net.ipv4.tcp_timestamps0Don’t add timestamps to use less CPU cycles.
net.ipv6.conf.all.accept_redirects0Don’t send redirects for IPv6.
net.ipv6.conf.all.disable_ipv60Enable IPv6.
net.ipv6.conf.default.accept_redirects0Don’t accept redirects for IPv6.

Kubernetes-specific tuning

SettingValueDescription
net.bridge.bridge-nf-call-ip6tables1Required for Kubernetes networking, enables ip6tables rules for bridged traffic.
net.bridge.bridge-nf-call-iptables1Required for Kubernetes networking, enables iptables rules for bridged traffic.
net.ipv4.ip_forward1Enable IP forwarding for IPv4.
net.ipv4.ip_local_reserved_ports30000-32767Reserved to avoid conflicts with kube-apiserver, which allocates within this range.
net.ipv6.conf.all.forwarding1Enable IP forwarding for IPv6.

CRI-specific tuning

SettingValueDescription
fs.inotify.max_user_instances8192Increase the max number of file descriptors to avoid a docker lock.
fs.inotify.max_user_watches16384Increase the max number of opened file watches to avoid a docker lock.
net.ipv4.conf.all.rp_filter0Disable rp_filter to avoid dropping mangled packets with Cilium.
net.ipv4.conf.cilium_*.rp_filter0Disable rp_filter on Cilium interfaces to avoid dropping mangled packets.
net.ipv4.conf.lxc*.rp_filter0Disable rp_filter on LXC interfaces to avoid dropping mangled packets.

Workload-specific tuning

SettingValueDescription
vm.max_map_count262144Increased mmapfs because some applications, like ES, need higher limit to store data properly.
vm.overcommit_memory1Allow memory overcommit to avoid issues with certain applications.