Hello everyone! I am new to using Terraform with AWS EKS and have been really wanting to work with this for some time. I am arriving to an issue which I do not seem to understand and I would greatly appreciate any help!
So, I was able to plan and push the example given by HashiCorp from this url: https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples/eks-getting-started.
It has successfully pushed and I can see the VPC with the 2 EC2 instances. The only field I changed is the instance type from m4.large to t2.small.
From this point, I am now trying to connect the clusters. I type out the specifications the kubeconfig like so:
terraform output kubeconfig > kubeconfig
The file is successfully installed in my folder and shows the correct information. However, an issue arises when I type this:
kubectl config view
I get this:
apiVersion: v1
clusters:
contexts:
current-context: “”
kind: Config
preferences: {}
users:
Why can’t my kubeconfig file connect to my system. I would appreciate any help!