You raised `nf_conntrack_max` on Kubernetes nodes via sysctl, but after a reboot or kube-proxy restart the value is back to something else.
IntermediateTroubleshootingSockets, ports, TIME_WAIT and conntrack
Answer
Likely causes → kube-proxy sets nf_conntrack_max itself on startup based on --conntrack-max-per-core × CPU cores (with --conntrack-min as a floor), overriding your sysctl. Also, if /etc/sysctl.d is applied before the nf_conntrack module loads, the key doesn't exist yet and is skipped.
Diagnose →
sysctl net.netfilter.nf_conntrack_max
kubectl -n kube-system get cm kube-proxy -o yaml | grep -A3 conntrack
journalctl -b | grep -i 'nf_conntrack'
Fix → Set it in kube-proxy's config (conntrack.maxPerCore, conntrack.min in KubeProxyConfiguration) and restart the DaemonSet. For non-kube-proxy hosts, load the module early (echo nf_conntrack > /etc/modules-load.d/conntrack.conf).
Prevent → Verify node sysctls after boot with a DaemonSet check or node-problem-detector, not just at provisioning time.
More on Sockets, ports, TIME_WAIT and conntrack
`dmesg` is full of `nf_conntrack: nf_conntrack: table full, dropping packet` and new connections randomly time out.Intermediate`ss -s` on a reverse proxy shows 40,000 sockets in `TIME_WAIT`. Is that a problem?BeginnerAn app server's `CLOSE_WAIT` count grows steadily until the service logs `Too many open files`.IntermediateLogs show `accept4(): Too many open files` and the service stops accepting connections.Beginner`dmesg` shows `TCP: request_sock_TCP: Possible SYN flooding on port 443. Sending cookies.`Intermediate`ss -ltn` shows the listener for port 8080 with `Recv-Q 129` and `Send-Q 128`, and clients hang on connect.Advanced