getting error while trying for kubectl get nodes on node

0 votes
I have ran kubeadm init on master and also post actions successfully and master looks good.

joined node successfully but getting below error:

[root@reshmi1 ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.5", GitCommit:"e6503f8d8f769ace2f338794c914a96fc335df0f", GitTreeState:"clean", BuildDate:"2020-06-26T03:47:41Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
[root@reshmi1 ~]# kubectl get nodes
The connection to the server localhost:8080 was refused - did you specify the right host or port?
[root@reshmi1 ~]#

on master below is o/p

[root@rojavm1 ~]# kubectl get pods --all-namespaces
NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE
kube-system   calico-kube-controllers-76d4774d89-qz6zx   1/1     Running   1          23h
kube-system   calico-node-l8hxj                          0/1     Running   1          24h
kube-system   calico-node-q4pk9                          0/1     Running   0          24h
kube-system   coredns-66bff467f8-294ph                   1/1     Running   1          23h
kube-system   coredns-66bff467f8-jv4zr                   1/1     Running   1          23h
kube-system   etcd-rojavm1                               1/1     Running   1          24h
kube-system   kube-apiserver-rojavm1                     1/1     Running   1          24h
kube-system   kube-controller-manager-rojavm1            1/1     Running   9          24h
kube-system   kube-proxy-896xp                           1/1     Running   0          24h
kube-system   kube-proxy-g2qwn                           1/1     Running   1          24h
kube-system   kube-scheduler-rojavm1                     1/1     Running   8          24h
[root@rojavm1 ~]#
Jul 6, 2020 in DevOps & Agile by Surya
• 120 points
2,050 views
Did you run the join command in your Slave/Worker node that you get from your master node?

1 answer to this question.

0 votes

Hi@Surya,

I think you did not configure your overlay Network. That's why your worker node is not able to connect to your master node. In your master node run the below-given command.

$ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

I hope this will help you.

answered Jul 9, 2020 by MD
• 95,460 points

Related Questions In DevOps & Agile

+5 votes
3 answers

Error while trying to install postgis extension with greenplum

Try re downloading the package and installing ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,181 views
0 votes
1 answer

Docker for Windows error: “kubectl context missing”

There is an issue with docker for ...READ MORE

answered Aug 28, 2018 in DevOps & Agile by Tyrion anex
• 8,700 points
814 views
0 votes
1 answer

Docker for windows error: while exposing Ports

I faced a similar issue, just follow ...READ MORE

answered Aug 29, 2018 in DevOps & Agile by Tyrion anex
• 8,700 points
2,883 views
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,360 points
1,353 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,326 views
0 votes
2 answers

Where can I get a hands on master class for certified Solutions Architect and DevOps?

Hey, @Boldbald, As you are also on the ...READ MORE

answered Sep 11, 2020 in DevOps & Agile by Gitika
• 65,890 points

edited Sep 25, 2020 by Sirajul 679 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP