<p><code>error: Couldn't get available api versions from server: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }</code></p>

<p>I had to set output format to <code>json</code>.</p>
<pre><code>&gt;kubectl get nodes
Unable to connect to the server: getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string &quot;json:\&quot;apiVersion,omitempty\&quot;&quot;; Kind string &quot;json:\&quot;kind,omitempty\&quot;&quot; }

&gt;aws configure
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
Default region name [eu-north-1]:
Default output format [text]: json

&gt;kubectl get nodes
NAME                                            STATUS   ROLES    AGE    VERSION
ip-192-168-20-202.eu-north-1.compute.internal   Ready    &lt;none&gt;   370d   v1.21.5-eks-9017834
</code></pre>
