One of the following apply:
Problem scenario #1
You are using EKS and you have no config file in the .kube directory. You want to run some kubectl commands.
Problem scenario #2
You are using EKS and run a kubectl command, but you get this error: "The connection to the server localhost:8080 was refused - did you specify the right host or port?"
Solution
Run a command like this (but replace "us-west-1" with your region and replace "foobar" with the cluster_name):
aws eks --region us-west-1 update-kubeconfig --name foobar