Home > OS >  EKS update config with awscli command "aws eks update-kubeconfig" fails with error "&
EKS update config with awscli command "aws eks update-kubeconfig" fails with error "&

Time:05-10

When running following command to update kubernetes config to get connected with EKS cluster then getting this error "'NoneType' object is not iterable"

aws eks update-kubeconfig --region us-east-2 --name <cluster name>

CodePudding user response:

If you have already kubeconfig file try keeping it as a backup and creating a new one with above command.

Open issue : https://github.com/aws/aws-cli/issues/4843

CodePudding user response:

Do you have an existing k8s config? Running

aws eks update-kubeconfig --region <region> --name <cluster name>

Generates a ~/.kube/config.

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.

If you have a ~/.kube/config file, and you aren't actively using it, running

rm ~/.kube/config

and then attempting

aws eks update-kubeconfig --region us-east-2 --name <cluster name>

afterwards will likely solve your issue.

If you are using your ~/.kube/config file, rename it something else so you could use it later, and then run the eks command again.

See a similar issue here: https://github.com/aws/aws-cli/issues/4843

  • Related