Timeout for Kubectl exec

7/11/2018

How can I set the timeout for the kubectl exec command ?

The below command does not work

kubectl exec -it pod_name bash --requrest-timeout=0 -n test
-- tomar
kubectl
kubernetes
timeout

1 Answer

7/11/2018

You have a typo, try:

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

See kubectl official documentation about request-timeout

--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")

Note that "0" is already the default.

-- Webber
Source: StackOverflow