Software Engineering

[Solved] Unable to connect with the server: dial tcp: lookup with AWS EKS

[Solved] Unable to connect with the server: dial tcp: lookup with AWS EKS
Written by admin


When you’ve got obtained the next error whereas attempting to situation instructions to kubectl:

Unable to connect with the server: dial tcp: lookup

Then it might be as a consequence of your kube-config being outdated. You may simply must replace the native kube-config.

replace the native kube-config

Make sure that to exchange eu-west-1 along with your cluster’s area, and exchange cluster_name with the identify of your EKS cluster.

aws eks --region "eu-west-1" update-kubeconfig --name "cluster_name"

replace kube-config from Terraform state

aws eks --region $(terraform output -raw area) update-kubeconfig --name $(terraform output -raw cluster_name)

The above code makes use of the Terraform state’s output from whenever you generated the cluster.

About the author

admin

Leave a Comment