- Newest
- Most votes
- Most comments
Thank you so much for the response. This at least pointed me in the right direction. After trying to go through those steps, I found that my config.yaml file had been over written somehow. Once I got that squared away, then everything started working as expected.
Thanks again for the help.
Dan
Hello,
When you run kubectl version
command, it shows you the client version i.e. kubectl binary version, and tries to connect to the kubernetes cluster in order to get the server version. In your case, since you do not have a running cluster configured in your kubeconfig file (~/.kube/config
), it is trying the default kubernetes cluster port on your Cloud9 Environment at localhost:8080
.
If you already have an EKS cluster running, you can run the below update-kubeconfig command to automatically set the kubeconfig file on your Cloud9 Environment.
aws eks update-kubeconfig --name <cluster-name> --region <aws-region>
If you wish to create a new EKS cluster for learning purpose, you can follow the below steps:
-
Install EKSCTL CLI on your Cloud9 Environment by following this doc: https://eksctl.io/installation/#for-unix
-
Create an EKS cluster using the below command:
Note: For customized settings, follow this doc: https://eksctl.io/usage/creating-and-managing-clusters/
eksctl create cluster --name <desired-cluster-name> --region <aws-region>
-
The above command should automatically set the kubeconfig file at
~/.kube/config
on your Cloud9 Environment after a successful execution. If not, you can run the update-kubeconfig command that I mentioned in earlier section. -
Once you are finished with it, you can delete the cluster using the below command:
eksctl delete cluster --name <cluster-name> --region <aws-region>
I highly recommend you to go through the EKS Workshop that contains hands-on tutorials to help you get familiarized with EKS.
I hope this helps!
Relevant content
- asked 2 years ago
- Accepted Answerasked 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago