Recently I started learning Kubernetes, and I am following k8’s course. I have created a aws instance and installed Kubernetes in that instance. When I try to execute the kubectl apply command or other commands like kubectl get pods I am getting below error.
“The connection to the server localhost:8080 was refused - did you specify the right host or port?”
Can you help me to fix this error.
Thanks in advance !!.
looks like kubectl is trying to connect to your local machine: localhost:8080 was refused. In order to connect to your AWS instance, you’ll have to configure kubectl with the right credentials.
How exactly did you install Kubernetes on AWS? Are you using Amazon EKS, or did you get an EC2 instance where you installed it manually?