I would like to change the default tcp keep alive value in a Kubernetes pod, what's the recommended approach?
Asked
Active
Viewed 3,924 times
2
-
2Is the question about pure Docker, or Kubernetes? The answer will be very different. – David Maze Sep 02 '21 at 21:37
-
It is an Azure kubernetes Container – Conundrum Sep 03 '21 at 15:25
1 Answers
1
You could do this via sysctls on the pod manifest in AKS/Kubernetes:
spec:
securityContext:
sysctls:
- name: "net.ipv4.tcp_keepalive_time"
value: "45"
Here is also further documentation:
https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/
https://docs.syseleven.de/metakube/de/tutorials/confiugre-unsafe-sysctls

Philip Welz
- 2,449
- 5
- 12