• Register
1 vote

Problem :

I am getting following kubernetes error and dont understand why command line is trying to connect to localhost?
the connection to the server localhost:8080 was refused - did you specify the right host or port?
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Please make sure your config is set to the project

gcloud config set project [PROJECT_ID]

Kindly run a checklist of the Clusters in the account: 

gcloud container clusters list

Must check the output : 

NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VE. alpha-cluster asia-south1-a 1.9.7-gke.6 f1-micro 1.9.7- NUM_NODES STATUS gke.6 3 RUNNING

Run the cmd

-gcloud container clusters get-credentials your-cluster-name --zone your-zone --project your-project


The output follows:

Fetching cluster endpoint and auth data. kubeconfig entry generated for alpha-cluster.


Now check the details of the node running kubectl like
-kubectl get nodes -o wide

If you follow above steps your issues will be resolved.

9 7 4
38,600 points

Related questions

0 votes
1 answer 1.3K views
Problem : I am very new to Curl. I have recently started learning Curl. Whenever I try to connect to the Elasticsearch using below command curl http://localhost:9200 it is working properly. But when I try to run the following command curl http://IpAddress: ... showing me below error “Curl: (7) failed to connect to localhost port 9200: connection refused” How can I resolve above error?
asked Feb 20, 2020 mphil 2.3k points
0 votes
1 answer 10 views
Can anybody help me out with this issue?
asked Jan 3 TeamScript 9.2k points
0 votes
2 answers 1.2K views
Problem : I am facing below error every time : javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706) at ... I am unable to understand the error why this is happening to my code. Please let me know how to fix above error.
asked Feb 3, 2020 jwilliam 3.9k points
0 votes
1 answer 730 views
Problem : Currently I am trying to develop the REST API using the Spring Framework I am unable to run my application because of below error. Description: The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may ... this application to listen on another port. My 8080 port on my PC is seems to be busy. How can I fix this issue?
asked Feb 28, 2020 mphil 2.3k points
0 votes
1 answer 13 views
Can anyone help me with how to solve this issue? Any help is greatly appreciated.
asked Dec 27, 2020 TeamScript 9.2k points
0 votes
2 answers 1.3K views
Problem : I am facing following error for the Stack: AngularJS v1.6.5, java 8, spring boot, tomcat. After about around 1 week of work, my application is not responding but giving me such an error. Why is this happening to me? My ... org.springframework.http.converter.ResourceHttpMessageConverter.writeInternal(ResourceHttpMessageConverter.java:200) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE] ...
asked Dec 10, 2019 alecxe 7.5k points
1 vote
1 answer 271 views
Problem: I am beginner to ruby on rails. Recently I have started learning ruby on rails in depth. I am trying to use the ruby on rails to develop my website but I am facing below error whenever I try to open the localhost. could not connect to server: Connection refused ... can’t fix the error so now I am looking for help from ruby on rails expert to give me the quick fix for above error.
asked May 18, 2020 Martin K 6.6k points