HomeSoftware Engineering Unable to connect with the server: dial tcp: lookup with AWS...

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


You probably have acquired the next error whereas making an attempt to difficulty instructions to kubectl:

Unable to connect with the server: dial tcp: lookup

Then it might be resulting from your kube-config being outdated. You may simply have to replace the native kube-config.

The right way to replace the native kube-config

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

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

The right way to 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.

RELATED ARTICLES

Most Popular

Recent Comments