Troubleshooting "Did you specify the right host or port?" Amazon EKS Error:

Jared Nielsen - Dec 14 '22 - - Dev Community

Let's say you're working through the Amazon EKS tutorial and, when you reach step 2.2 and run kubectl get svc, you get the following error:

E1214 14:39:13.139525  398989 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E1214 14:39:13.139752  398989 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E1214 14:39:13.141035  398989 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E1214 14:39:13.142235  398989 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E1214 14:39:13.143744  398989 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Enter fullscreen mode Exit fullscreen mode

The tutorial directs you to this troubleshooting guide, but if you don't find the answer there, try the following:

aws eks update-kubeconfig --name <EKS_Cluster_Name> --region <Region_Name>
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .