I recently encountered this error while trying to run ‘kubectl’ commands over our AWS EKS cluster, not sure if it's shared by more k8s vendors.
In short, you are using an incompatible ‘AWS CLI’ version with your current AWS EKS version.
To fix it — Update your ‘AWS CLI’
Installing or updating the latest version of the AWS CLI
This topic describes how to install or update the latest release of the AWS Command Line Interface (AWS CLI) on…
For Linux x86 (64-bit)
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
Hope it helped. Cheers.
Thanks to Yaniv Ben-hemo for writing & Idan Asulin For the QA.