• Register
1 vote
204 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 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 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.

9 7 4
38,600 points

Related questions

0 votes
1 answer 4 views
4 views
Problem: Is there anyone to helo on > 'connect to host localhost port 22 connection refused' ?
asked Mar 18 sadi1982 36.3k points
0 votes
1 answer 1.7K views
1.7K 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 11 views
11 views
Problem: I am facing below error every time :Javax.mail.messagingexception: could not connect to smtp host: localhost, port: 25, response: 421.
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 30 views
30 views
Can anybody help me out with this issue?
asked Jan 3 TeamScript 13.5k points
0 votes
2 answers 1.5K views
1.5K 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 3 views
3 views
Problem: I'm having trouble processing this error: It is required that the operation be exported or include an intent-filter of Could not open connection to the host on port 23 connect failed windows 10.
asked Apr 1 rakib1 50.4k points
0 votes
1 answer 4 views
4 views
Problem: What are my options for dealing with this issue “Telnet could not open connection to the host on port 23 connect failed”?
asked Apr 1 rakib1 50.4k points
0 votes
1 answer 5 views
5 views
Problem: When I encountered this problem, I attempted to find a solution on the internet but was unable to find any useful details. If you read the above query and understand what the solution is, please cooperate with me- Thanks.
asked Apr 1 rakib1 50.4k points
0 votes
1 answer 4 views
4 views
Problem: When I encountered this problem, I attempted to find a solution on the internet but was unable to find any useful details. If you read the above query and understand what the solution is, please cooperate with me- Thanks.
asked Apr 1 rakib1 50.4k points