aws / eks-anywhere

Run Amazon EKS on your own infrastructure 🚀
https://anywhere.eks.amazonaws.com
Apache License 2.0
1.96k stars 285 forks source link

Unable to describe my cluster using eks command #352

Closed sagarkundral24 closed 3 years ago

sagarkundral24 commented 3 years ago

What happened:

Hello, I created a eks anywhere local cluster using docker mode and also registered it in the eks console and after granted full access to the iam user. Now, I can see the workloads of the cluster from the eks console. However when I try to describe my cluster using eks on the CLI, nothing shows up. Please suggest if I am missing something here

root@localhost:~# eks describe-cluster --name "dev-cluster" --region us-east-1

Command 'eks' not found, did you mean:

command 'eus' from deb euslisp (9.26+dfsg-2) command 'sks' from deb sks (1.1.6-14) command 'ecs' from deb ecere-dev (0.44.15-1build3) command 'eos' from deb elk-lapw (6.3.2-1)

What you expected to happen: I expect to see the details of my cluster.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment: Docker Version: 20.10.8 OS: "Ubuntu 20.04.3 LTS" eksctl version: 0.67.0 eksctl anywhere version: v0.5.0

TerryHowe commented 3 years ago

The eks command is part of https://github.com/canonical/eks-snap which is a way to install EKS Distro on MicroK8s. You created the cluster with EKS Anywhere, so what you are doing seems to me a bit like putting Chevy parts on a Ford. It may work, but no one has tried it before. Maybe try kubectl describe cluster which would show you your cluster custom resource or regular kubectl commands.

sagarkundral24 commented 3 years ago

@TerryHowe I am following the link below where they are trying to describe the eks anywhere cluster after registering it with eks. Are you saying we cannot use it with eks anywhere?

eks describe-cluster --name "my-first-registered-cluster" --region ${AWS_REGION}

{ "cluster": { "name": "my-first-registered-cluster", "arn": "arn:aws:eks:{EKS-REGION}:{ACCOUNT-ID}:cluster/my-first-registered-cluster", "createdAt": 1627672425.765, "connectorConfig": { "activationId": "xxxxxxxxACTIVATION_IDxxxxxxxx", "activationExpiry": 1627676019.0, "provider": "OTHER", "roleArn": "arn:aws:iam::{ACCOUNT-ID}:role/eks-connector-agent" }, "status": "ACTIVE", "tags": {} } } https://aws.amazon.com/blogs/aws/amazon-eks-anywhere-now-generally-available-to-create-and-manage-kubernetes-clusters-on-premises/

danbudris commented 3 years ago

hey there @sagarkundral24

In the blog post, I believe they're using the eks sub-command of the aws CLI Version 2.

Make sure you have the aws CLI installed (link above), and try aws eks describe-cluster --name "my-first-registered-cluster" --region ${AWS_REGION}

sagarkundral24 commented 3 years ago

Thank you @danbudris I was able to describe the cluster when I use aws in front of my command.

TerryHowe commented 3 years ago

Sorry, I didn't know this was in reference to that blog post.

channy commented 3 years ago

@sagarkundral24 Sorry for confusing. I fixed the blog post. Thanks for great feedback!