Conundrum
Conundrum

Reputation: 53

How to change a Kubernetes pod tcp_keepalive

I would like to change the default tcp keep alive value in a Kubernetes pod, what's the recommended approach?

Upvotes: 2

Views: 6531

Answers (1)

Philip Welz
Philip Welz

Reputation: 2807

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

Upvotes: 2

Related Questions