Kubectl error eks ekctl

Hi I used to aws ec2 instance for setup kubernests (aws linux 2023), I setup eks using the eksctl and kubectl , the error comes like this ,

Plese asisst resolve this issuer\

If you are doing this on playground, eksctl isn’t supported there.

Even if it was, the actual error you are getting here is because it can’t find a valid kubeconfig file you it is looking to localhost:8080 for an API server.

To build EKS clusters in playground you must follow this guide, or this guide, and ensure that the kubeconfig file is present for kubectl to work.

HI Alistair,

it’s not the playgorund environment,

Can I know if the Kubecofig file was only created after the nodes were created? and I used to AWS Cloud formation to create the kubernets cluster.

Thanks
Kalpana

You need to run

aws eks update-kubeconfig --region <region> --name <cluster_name>

Where you must replace <region> with the region you deployed EKS to and <cluster_name> with the name of the cluster as shown in the EKS console.

Hi Alistair,

Execute command - eksctl create cluster --name kalpana --region us-east-2 --node-type t2.small

I faced an issue like this also, Cloud formation says it’s completed, but I can’t see nodes in the EC2 instances section, Why did that issue come?

And my ssh session was automatically crashed, I faced this one also several times

2024-01-14 14:47:59 [:information_source:] eksctl version 0.167.0
2024-01-14 14:47:59 [:information_source:] using region us-east-2
2024-01-14 14:48:00 [:information_source:] setting availability zones to [us-east-2b us-east-2a us-east-2c]
2024-01-14 14:48:00 [:information_source:] subnets for us-east-2b - public:192.168.0.0/19 private:192.168.96.0/19
2024-01-14 14:48:00 [:information_source:] subnets for us-east-2a - public:192.168.32.0/19 private:192.168.128.0/19
2024-01-14 14:48:00 [:information_source:] subnets for us-east-2c - public:192.168.64.0/19 private:192.168.160.0/19
2024-01-14 14:48:00 [:information_source:] nodegroup “ng-0c930616” will use “” [AmazonLinux2/1.27]
2024-01-14 14:48:00 [:information_source:] using Kubernetes version 1.27
2024-01-14 14:48:00 [:information_source:] creating EKS cluster “kalpana” in “us-east-2” region with managed nodes
2024-01-14 14:48:00 [:information_source:] will create 2 separate CloudFormation stacks for cluster itself and the initial managed nodegroup
2024-01-14 14:48:00 [:information_source:] if you encounter any issues, check CloudFormation console or try ‘eksctl utils describe-stacks --region=us-east-2 --cluster=kalpana’
2024-01-14 14:48:00 [:information_source:] Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster “kalpana” in “us-east-2”
2024-01-14 14:48:00 [:information_source:] CloudWatch logging will not be enabled for cluster “kalpana” in “us-east-2”
2024-01-14 14:48:00 [:information_source:] you can enable it with ‘eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=us-east-2 --cluster=kalpana’
2024-01-14 14:48:00 [:information_source:]
2 sequential tasks: { create cluster control plane “kalpana”,
2 sequential sub-tasks: {
wait for control plane to become ready,
create managed nodegroup “ng-0c930616”,
}
}
2024-01-14 14:48:00 [:information_source:] building cluster stack “eksctl-kalpana-cluster”
2024-01-14 14:48:00 [:information_source:] deploying stack “eksctl-kalpana-cluster”

2024-01-14 14:48:30 [:information_source:] waiting for CloudFormation stack “eksctl-kalpana-cluster”
2024-01-14 14:49:00 [:information_source:] waiting for CloudFormation stack “eksctl-kalpana-cluster”

2024-01-14 14:50:00 [:information_source:] waiting for CloudFormation stack “eksctl-kalpana-cluster”

2024-01-14 14:51:00 [:information_source:] waiting for CloudFormation stack “eksctl-kalpana-cluster”

Network error: Software caused connection abort

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Session stopped
- Press to exit tab
- Press R to restart session
- Press S to save terminal output to file

Hi,
please Any one can help me to solve this issue?

Kalpana