kubernetes - Kubectl exec 超时

标签 kubernetes timeout kubectl

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

下面的命令不起作用

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

最佳答案

你有一个错字,试试:

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”已经是默认值。

关于kubernetes - Kubectl exec 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51278326/

相关文章:

c# - Rx 框架 : execute an action on timeout without interrupting the original observable sequence

javascript - 如何使 AJAX 调用挂起

kubernetes - 如何在 k8s 中转储每个命名空间的资源(CPU、内存)使用情况?

kubernetes - ~/.kube/config 中的 "preferences: {}"是做什么的?

kubernetes - 通过外部 VIP 或 float IP 启用对 Kubernetes 仪表板的访问

kubernetes - 如何对 Kubernetes 服务的请求使用 session 亲和性?

kubernetes - 使用 haproxy 部署 HA kubernetes master 时,kubeadm init 卡在健康检查中

javascript - 刷新/定时器功能仅适用于 2 个提要中的 1 个 -- $q.all() 合并

go - Leader election - Pod 没有选择作为领导者

kubernetes - 在 Knative 服务上启用 HTTPS