<p>Update: this is a network issue. Nothing to do with the software stack.</p>
<p>I have a k8s cluster running in another, not-so-secure network, and I am obviously using kubeconfig.</p>
<p>I can do all other stuff, just not <code>kubectl apply -f</code>.</p>
<p>The problem is I get - when <code>kubectl apply -f &lt;file&gt;:</code></p>
<pre><code>    kubectl  E0914 18:43:57.731039    4053 request.go:1085] Unexpected error when reading response body: context deadline exceeded (Client.Timeout or context cancellation while reading body)
error: unexpected error when reading response body. Please retry. Original error: context deadline exceeded (Client.Timeout or context cancellation while reading body)
</code></pre>
<p>Do you know what to do?</p>
<pre><code>kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;25&quot;, GitVersion:&quot;v1.25.0&quot;, GitCommit:&quot;a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2022-08-23T17:36:43Z&quot;, GoVersion:&quot;go1.19&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/arm64&quot;}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;25&quot;, GitVersion:&quot;v1.25.0&quot;, GitCommit:&quot;a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2022-08-23T17:38:15Z&quot;, GoVersion:&quot;go1.19&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/arm64&quot;}
</code></pre>

Chris G.
<p>It's maybe a network issue. have you tried using request-timeout option in your command?</p>
<pre><code>kubectl apply -f &lt;file&gt; --request-timeout=4s 
</code></pre>
<p>From the documentation:</p>
<pre><code>--request-timeout string     Default: &quot;0&quot;
</code></pre>
<p>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.</p>
