<p>I experienced slow response of any kubectl command at my test environment. 
I don't have this issue in the production and at minikube in my dev.
For example I run:</p>

<pre><code>kubectl get deployments
</code></pre>

<p>And I have to wait even one minute. If I break with <em>Ctrl + C</em>, and start again sometimes it respond immediately. And when I repeat command is again delayed.</p>

<p>Do you have any tips where I should dig in ? 
Could it be memory issue ? Or rather network issue?
How can I monitor them ?
I'm in ssh session to one of master .</p>

<p>I had also slow response of any kubectl command at one of my testing environment. I checked API response timings by using</p>
<pre><code>kubectl get deployments -v=6
</code></pre>
<p>and encounter the following error</p>
<pre><code>Error loading discovery information: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request
</code></pre>
<p>This error is caused by the metrics server being down for some error, or in case it has been deleted. We can check the list of api services using kubectl get apiservice. If we want to get rid of this error we can just removed the apiservice using kubectl delete apiservice as follows:</p>
<pre><code>$ kubectl delete apiservice v1beta1.metrics.k8s.io
apiservice.apiregistration.k8s.io &quot;v1beta1.metrics.k8s.io&quot; deleted
</code></pre>
<p><a href="https://pet2cattle.com/2021/05/unable-to-retrieve-the-complete-list-of-server-apis" rel="nofollow noreferrer">This blog</a> supports the same idea.</p>
