Troubleshooting an eksctl 'no cluster found' region mismatch
Journey: 📊 Community Builder 📊
Subject matter: 💡 Troubleshooting 💡
Task: Troubleshooting an eksctl “no cluster found” region mismatch
While working on this project I ran into a problem that needed troubleshooting and thought I would share it.
Problem observed:
I was attempting to perform an eksctl utils command to associate an IAM OIDC provider but it was failing with an error: “ResourceNotFoundException: No cluster found for name”
Click to enlarge:
The eksctl get clusters command was showing error: “No clusters found”
However, when checking my EKS cluster in the Management Console, I cound see it no problem:
I checked the pods and could see these online, and when I specified the region in my get clusters command it could see the cluster ok:
eksctl get clusters –region
Fix required:
The aws configured “default region” was set incorrectly in aws.configure. My default region was set as a different region to the target EKS cluster region in my project, therefore my AWS CLI was looking for the EKS cluster in the wrong place.
I opened the aws configuration file with command: .aws/config
This opened a new notepad window which showed me the following:
I then returned to my management console and confirmed that my EKS cluster was running in region US-East-1.
I amended the default region and saved the file:
I was then able to run the get clusters command successfully:
After my cluster could be observed, I then issued the OIDC association request and it worked:
Articles that helped overcome the issue:
https://stackoverflow.com/questions/62342808/eksctl-no-clusters-found
https://stackoverflow.com/questions/56782637/best-way-to-seed-new-machine-with-k8s-eks-info
https://medium.com/pablo-perez/common-errors-when-setting-up-eks-for-the-first-time-a43cbf989a2e
If this post helps just one other person, it has served its purpose well!