Sunday, September 1, 2019

Service with load balancer


• In a real world scenario, you need to be able to access the app from outside 

the cluster 

• On AWS, you can easily add an external Load Balancer 

• This AWS Load Balancer will route the traffic to the correct pod in Kubernetes 

• There are other solutions for other cloud providers that don't have a Load 

Balancer.
1.Your own haproxy / nginx load balancer in front of your cluster 
2.Expose ports directly 
 
 
 
We can use kubectl command to create a service or can use an yml file like below.
 
 
 
 
kubectl create -f first-app/helloworld.yml
kubectl create -f first-app/helloworld-service.yml


it will create a load balancer in the aws services--load balancer.
Also, we can create a new record set in route53->hosted zones., with alias as a  type.
 

No comments:

Post a Comment