title: Keepalive for kubectl exec
body: <p>I'm running into a peculiar issue with <code>kubectl exec -it ...</code> sessions.</p>
  
  <p>They time out after 4-5 minutes depending on the cloud provider and some obscure tuning that despite my searches I could not figure out. This is a know issue, people seem to disagree wether it is due to load-balancer time-outs or kubelet ones.</p>
  
  <p>Either way, none of the options on <code>kubectl</code> or<code>kubectl exec</code> offer any kind of keep-alive or timeout tuning.</p>
  
  <p>I traced things with <code>tcpdump</code> and I indeed receive <code>RESET</code> packets after 4-5mins.</p>
  
  <p>However I also noticed that it only happens when the session is idle. If I type any command in, the 4-5mins are reset.</p>
  
  <p>So I'm looking for a way to easily send keepalive TCP/UDP packets from the kubectl session back to the calling computer, every minutes or so (and then time it out myself at my discretion).</p>
  
  <p>How can I achieve that?</p>
  
  <p>EDIT: another way to ask this is:
  - How can I find the IP/Port back to the computer that opened the <code>kubectl exec</code> session?</p>