eksctl "no clusters found"
Asked Answered
A

2

11

I am currently trying out aws eks and I am havin a problem managing my cluster via eksctl. Now creating a cluster via eksctl works just fine using

eksctl create cluster --region [region] --name my-cluster

The cluster comes up correctly and it also shows in the AWS console Web GUI but if I try to get it with

eksctl get clusters

I get

No clusters found

I set up my roles as described in the documentation (EKS Cluster) role and added Access Key Id and Secret Access Key to my configuration. But could this be an issue with the permissions? If not, what else could it be

Archbishopric answered 12/6, 2020 at 10:56 Comment(3)
What does kubectl config get-contexts give you?Reluctance
current namepsace is correct. i also can deploy correctly. it's just the eksctl that has its problems. I can also delete the cluster in the console again but would rather do it via eksctlArchbishopric
Including the region of your cluster will make it work. use --region with the above eksctl commandPeruke
A
31

Have you tried to run:

eksctl get clusters --region [region]

What's your default region configured, probably you have it set up to a different one than the one where you created the cluster, e.g.:

$ eksctl get clusters
No clusters found

$ eksctl get clusters --region eu-west-2
NAME                REGION
eksworkshop-eksctl  eu-west-2

$ export AWS_REGION=eu-west-2
$ eksctl get clusters
NAME                REGION
eksworkshop-eksctl  eu-west-2
Addlepated answered 25/6, 2020 at 16:7 Comment(1)
Thanks. You saved me a few hours here as someone who is new to awsGora
E
4

In my case, we had a different profile to the default, under .aws/config, so I had to pass --profile PROFILE parameter.

Eyelet answered 15/11, 2021 at 9:20 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.