<p>When running following command to update kubernetes config to get connected with EKS cluster then getting this error &quot;'NoneType' object is not iterable&quot;</p>
<pre><code>aws eks update-kubeconfig --region us-east-2 --name &lt;cluster name&gt;
</code></pre>

<p>Do you have an existing k8s config? Running</p>
<p><code>aws eks update-kubeconfig --region &lt;region&gt; --name &lt;cluster name&gt;</code></p>
<p>Generates a ~/.kube/config.</p>
<p>If you already have a ~/.kube/config, there could be a conflict between the file to be generated, and the file that already exists that prevents them from being merged.</p>
<p>If you have a ~/.kube/config file, and you aren't actively using it, running</p>
<p><code>rm ~/.kube/config</code></p>
<p>and then attempting</p>
<p><code>aws eks update-kubeconfig --region us-east-2 --name &lt;cluster name&gt;</code></p>
<p>afterwards will likely solve your issue.</p>
<p>If you are using your <code>~/.kube/config file,</code> rename it something else so you could use it later, and then run the eks command again.</p>
<p>See a similar issue here:
<a href="https://github.com/aws/aws-cli/issues/4843" rel="noreferrer">https://github.com/aws/aws-cli/issues/4843</a></p>
