<pre><code>kubectl get pods
kubectl get namespace
kubectl describe ns.yml
</code></pre>
<p>When I try to execute any commands from above I am getting the following error:</p>
<blockquote>
<p>E0824 14:41:42.499373   27188 memcache.go:238] couldn't get current server API group list: Get &quot;https://127.0.0.1:53721/api?timeout=32s&quot;: dial tcp 127.0.0.1:53721: connectex: No connection could be made because the target machine actively refused it.</p>
</blockquote>
<p>Could you please help me out, how to resolve it?</p>
<p>Can any one tell me what is wrong with my kubutcl utility</p>

Kavitha Boda
<p>So, the kubectl commands needs to be configured! Currently kubectl is trying to connect to the kube-api on your local machine (127.0.0.1), clearly there is no kubernetes there so it throws the error &quot;No connection could be made...&quot;</p>
<p>To change the kubectl settings you need to find the kubectl config file at the path:</p>
<p>Windows: <code>%userprofile&quot;\.kube\config</code>
Linux: <code>$HOME/.kube/config</code></p>
<p>Open the file with any editor and then you need to change the ip 127.0.0.1 to any external ip of one of your nodes!</p>
<p>This will solve your connection problem but there might be another issue with your certificate! I will alter my answer when you tell me what kubernetes distro you are using (e.g. k3s, k8s, ...)</p>
