#134194·Kubernetes

why net.core.somaxconn is unsafe in k8s?

Author: wuzhuoquanCreated Sep 22, 2025Updated Sep 17, 2026
Labelssig/networksig/nodekind/featuretriage/accepted

According to the official documentation, the net.core.somaxconn kernel parameter is considered unsafe, so if you want to use securityContext.sysctls to set it, you must use --allowed-unsafe-sysctls to authorize and allow it. When a container starts and creates a network namespace, it calls kernel methods to create it, and these kernel methods use default values to create it. In versions before 5.4, the default value is 128, while in versions 5.4 and later, it's 4096. I have some doubts about this - why is this specific kernel parameter marked as unsafe?