7

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

relief.melone
  • 3,042
  • 1
  • 28
  • 57

2 Answers2

24

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
Oliniusz
  • 413
  • 3
  • 8
2

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

suren
  • 7,817
  • 1
  • 30
  • 51