How to configure load balancer in kubernetes

0 votes
How to configure load balancer in kubernetes ?
Dec 4, 2018 in Kubernetes by Ali
• 11,360 points
596 views

1 answer to this question.

0 votes

In the deployment file keep the type as LoadBalancer and then create a service for it.

Execute this command to get the ip of your load balancer:

kubectl describe services example-service

You'll see something like this:

  Name:                   example-service
    Namespace:              default
    Labels:                 <none>
    Annotations:            <none>
    Selector:               app=example
    Type:                   LoadBalancer
    IP:                     10.67.252.103
    LoadBalancer Ingress:   123.45.67.89
    Port:                   <unnamed> 80/TCP
    NodePort:               <unnamed> 32445/TCP
    Endpoints:              10.64.0.4:80,10.64.1.5:80,10.64.2.4:80
    Session Affinity:       None
    Events:                 <none>

That'll be your load balancer's IP

follow these docs for detailed info.

answered Dec 4, 2018 by Haseeb

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,300 points
2,229 views
0 votes
1 answer

How do I sign-in to kubernetes dashboard?

Since version 1.7 Dashboard uses more secure ...READ MORE

answered Sep 7, 2018 in Kubernetes by DareDev
• 6,890 points
2,054 views
0 votes
2 answers
+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
14,618 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,111 views
0 votes
2 answers
0 votes
2 answers

How can I access a service installed on Kubernetes from anywhere?

if u want to directly want to ...READ MORE

answered Jul 26, 2020 in Kubernetes by Akash Gupta
1,086 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