Kubectl执行程序超时

时间:2018-07-11 06:10:11

标签: kubernetes timeout kubectl

如何设置kubectl exec命令的超时时间?

以下命令不起作用

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

1 个答案:

答案 0 :(得分:1)

您有错字,请尝试:

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

有关请求超时,请参见kubectl official documentation

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

请注意,“ 0”已经是默认值。