<p>Trying to make sense if there is any difference between the <code>kubectl --request-timeout</code> flag which seems to be a generic timeout flag that can be used for all kubectl sub-commands VS the <code>timeout</code> flag for individual kubectl sub-commands such as <code>kubectl apply -timeout</code></p>

tortuga
<p>I believe the <code>-timeout</code> flag is for the operation itself. For example if you issue it with <code>kubectl delete</code> it will wait upto <code>timeout</code> amount of time before considering the object 'deleted'.</p>
<p>Whereas the <code>--request-timeout</code> is the timeout on the HTTP request itself, that can be set to account for slower API requests.</p>
<p>The relationship between them can be characterised as:</p>
<pre><code>timeout = request_timeout + time_of_operation
</code></pre>
<p>So, if a request timeout of 1s is set, and we set 2s as timeout, we are allowing up to 1s for the API server to perform the operation. Afterwards, the kubectl binary will return <code>success</code>.</p>
<p>The default values for both are, of course 0s (no timeout) and that is why your <code>kubectl</code> binary can get &quot;stuck&quot; if either the API server doesn't respond, or the operation itself gets stuck (object takes too long to delete).</p>
