How to change idle-timeout for oc logs/exec/rsh/... commands in OCP 4

Solution Verified - Updated -

Issue

  • TCP Streaming connections get timed out (oc commands like oc rsh, oc exec, oc logs, oc debug or oc port-forward) in OpenShift 4.
  • After 15 minutes the connection times out.
  • Messages like the following ones are shown:

    portforward.go:233] lost connection to pod
    
    timed out waiting for input: auto-logout
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.8+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content