Problem scenario
kubectl commands are failing with an error message like this: “Unable to connect to the server: dial tcp: lookup ABCD123EFG.gr7.us-west-1.eks.amazonaws.com on x.x.x.x:53: no such host”
How do you get kubectl commands to work?
Possible Solution #1
If you are using EKS and you have the name of the cluster (e.g., “foobar”), run a command like this:
aws eks update-kubeconfig –name foobar
Possible Solution #2
- Find what VPC your EC-2 instance is in.
…