0

In K8s, I am getting logged-out from the bash after 15 seconds, Is there any way to increase this ideal timeout.

Kite@xxx-qa-n01:/deployment$ time kubectl exec -ti elasticsearch-0 -n pprod -- bash
[elasticsearch@elasticsearch-0 ~]$
real    0m15.167s
user    0m0.108s
sys 0m0.057s
Kite@xxx-qa-n01:/deployment$ 
user87005
  • 964
  • 3
  • 10
  • 27

1 Answers1

0

The timeout for the exec can be set using the flag --request-timeout along with the command as below

kubectl exec -it pod_name bash --request-timeout=0 -n test

Please refer kubectl flags for more details.

--request-timeout string           The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
Chandra Sekar
  • 637
  • 4
  • 9