5

Question is similar to following SO question. But I am not looking forward to create classic load balancer.

How to create Kubernetes load balancer on aws

AWS now provide 2 types of loadbalancer, classic load balancer and application load balancer. Please read following document for more information,

https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/

I already know how classic load balancer work with kubernetes. I wonder if there is any flag/ tool exist so that we can also configure application loadbalancer.

Community
  • 1
  • 1
Balkrishna
  • 2,897
  • 3
  • 23
  • 31

2 Answers2

3

I can tell you that as of K8 v1.2.3/4 there is no built-in support for Application Load Balancers.

That said, what I do is expose internally load balanced pods via a service NodePort. You can then implement any type of AWS load balancing you would like, including new Application Load Balancing features such as Content-Based Routing, by setting up your own AWS ALB that directs a URL path like /blog to a specific NodePort.

You can read more about NodePorts here: http://kubernetes.io/docs/user-guide/services/#type-nodeport

For bonus points, you could script the creation of the ALB via something like BOTO3 and have it provisioned when you provision the K8 services/pods/rc.

Drew
  • 701
  • 2
  • 10
  • 22
  • I am able to setup ALB with this approach. – Balkrishna Sep 07 '16 at 15:53
  • Simple boto3 script and aws-cli, (boto3 still missing some dependencies) is created to support this answer, https://gist.github.com/pandeybk/1c17fc89bed1c560261d48f1b6d01ae9 – Balkrishna Sep 22 '16 at 21:03
3

An AWS ALB Ingress Controller has been built which you can find on GitHub: https://github.com/coreos/alb-ingress-controller

Brandon Philips
  • 381
  • 1
  • 5