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

Conundrum
<p>You could do this via sysctls on the pod manifest in AKS/Kubernetes:</p>
<pre><code>spec:
  securityContext:
    sysctls:
    - name: &quot;net.ipv4.tcp_keepalive_time&quot;
      value: &quot;45&quot;
</code></pre>
<p>Here is also further documentation:</p>
<p><a href="https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/</a></p>
<p><a href="https://docs.syseleven.de/metakube/de/tutorials/confiugre-unsafe-sysctls" rel="nofollow noreferrer">https://docs.syseleven.de/metakube/de/tutorials/confiugre-unsafe-sysctls</a></p>
