2017-09-18 06:40:33 +02:00
|
|
|
# Ingress Network Load Balancer
|
|
|
|
resource "aws_elb" "ingress" {
|
|
|
|
name = "${var.cluster_name}-ingress"
|
|
|
|
subnets = ["${aws_subnet.public.*.id}"]
|
|
|
|
security_groups = ["${aws_security_group.worker.id}"]
|
|
|
|
|
|
|
|
listener {
|
|
|
|
lb_port = 80
|
|
|
|
lb_protocol = "tcp"
|
|
|
|
instance_port = 80
|
|
|
|
instance_protocol = "tcp"
|
|
|
|
}
|
|
|
|
|
|
|
|
listener {
|
|
|
|
lb_port = 443
|
|
|
|
lb_protocol = "tcp"
|
|
|
|
instance_port = 443
|
|
|
|
instance_protocol = "tcp"
|
|
|
|
}
|
|
|
|
|
2017-09-28 09:46:17 +02:00
|
|
|
# Ingress Controller HTTP health check
|
2017-09-18 06:40:33 +02:00
|
|
|
health_check {
|
|
|
|
target = "HTTP:10254/healthz"
|
|
|
|
healthy_threshold = 2
|
|
|
|
unhealthy_threshold = 4
|
|
|
|
timeout = 5
|
|
|
|
interval = 6
|
|
|
|
}
|
|
|
|
|
|
|
|
connection_draining = true
|
|
|
|
connection_draining_timeout = 300
|
|
|
|
}
|