I m trying to create a simple service on kubernetes

0 votes

but it throws the following error

root@ip-172-31-24-50:/home/ubuntu# kubectl get pods

The connection to the server localhost:8080 was refused - did you specify the right host or port?

Dec 20, 2020 in DevOps & Agile by Edureka
• 130 points
514 views

1 answer to this question.

0 votes

Hi@Edureka,

After you run the kubeadm init command in your master node, it will show you that you need to run the below-given command to your master node.

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

If you get the same error again, then check the context in your cluster using the below command.

$ kubectl config view

If the context is not set, then you need to set that.

answered Dec 21, 2020 by MD
• 95,460 points

Related Questions In DevOps & Agile

0 votes
1 answer
0 votes
1 answer

Upgrading a service leads to Rancher losing persistence of environment variables

when you upgrade, what it will do ...READ MORE

answered Apr 27, 2018 in DevOps & Agile by shubham
• 7,340 points
1,022 views
0 votes
1 answer
+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,574 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,061 views
+1 vote
1 answer

What are some best sites available to learn Kubernetes?

Hi@akhtar There are a number of websites which offers ...READ MORE

answered May 23, 2020 in DevOps & Agile by MD
• 95,460 points
638 views
0 votes
2 answers

What are the prerequisites required to learn Kubernetes?

Pre-requistic knowledge you requires before get started ...READ MORE

answered Oct 13, 2020 in DevOps & Agile by vivek kumar sahu
12,422 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