If you created a cluster on AWS using kops, then kops creates ~/.kube/config
for you, which is nice. But if someone else needs to connect to that cluster, then they also need to install kops so that it can create the kubeconfig for you:
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
export CLUSTER_ALIAS=kubernetes-cluster
kubectl config set-context ${CLUSTER_ALIAS} \
--cluster=${CLUSTER_FULL_NAME} \
--user=${CLUSTER_FULL_NAME}
kubectl config use-context ${CLUSTER_ALIAS}
kops export cluster --name ${CLUSTER_FULL_NAME} \
--region=${CLUSTER_REGION} \
--state=${KOPS_STATE_STORE}