Kubectl describe nodes command fails with E0422

0

Experience level is novice.

I've built my kubernetes cluster and see my nodes and pods in the AWS EKS console but when I try to use kubectl describe nodes command it fails. I've tried it on both the AWS CLI and Cloudshell. Any guidance is appreciated.

E0422 09:52:26.605185 127060 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

1 Answer
0

Hi

E0422: This is an error code within Kubernetes, not directly related to AWS. dial tcp [::1]:8080: This indicates kubectl is trying to connect to the API server on localhost (::1) at port 8080, which is the default port for the API server.

Ensure you've configured kubectl to point to your EKS cluster. You can achieve this by running aws eks update-kubeconfig --name <your-cluster-name> (replace <your-cluster-name> --region <regionname> with your actual cluster name). This command creates a kubeconfig file that points to your EKS cluster. https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html#create-kubeconfig-automatically

Check Cluster Health: Use the AWS CLI to check the health of your EKS cluster nodes: aws eks describe-nodegroup --cluster-name <your-cluster-name>--nodegroup-name <your-noegroup-name>

https://docs.aws.amazon.com/cli/latest/reference/eks/describe-cluster.html

profile picture
GK
answered 11 days ago
profile picture
EXPERT
reviewed 11 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions