• Register
1 vote
84 views

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.9k points

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 35.200.254.78 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.

36.1k points
edited by

Related questions

0 votes
1 answer 602 views
602 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 mphil 2.3k points
0 votes
2 answers 569 views
569 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 jwilliam 3.9k points
0 votes
1 answer 171 views
171 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 mphil 2.3k points
1 vote
1 answer 39 views
39 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 Martin K 6.6k points
0 votes
1 answer 161 views
161 views
Problem : I am not very sure how can I fix the below issue I have really no idea about why am I facing below error while trying to do the runserver: Performing system checks... System check identified no issues (0 silenced). Unhandled exception in thread ... server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
asked Dec 25, 2019 alecxe 7.5k points