2018-10-28 22:17:12 +01:00
# Azure
2019-07-30 07:41:10 +02:00
## Load Balancing
![Load Balancing ](/img/typhoon-azure-load-balancing.png )
### kube-apiserver
A load balancer distributes IPv4 TCP/6443 traffic across a backend address pool of controllers with a healthy `kube-apiserver` . Clusters with multiple controllers use an availability set with 2 fault domains to tolerate hardware failures within Azure.
### HTTP/HTTPS Ingress
2024-07-06 02:21:50 +02:00
An Azure Load Balancer distributes IPv4/IPv6 TCP/80 and TCP/443 traffic across backend address pools of workers with a healthy Ingress controller.
2019-07-30 07:41:10 +02:00
2024-07-06 02:21:50 +02:00
The load balancer addresses are output as `ingress_static_ipv4` and `ingress_static_ipv6` for use in DNS A and AAAA records. See [Ingress on Azure ](/addons/ingress/#azure ).
2019-07-30 07:41:10 +02:00
### TCP/UDP Services
Load balance TCP/UDP applications by adding rules to the Azure LB (output). A rule may map different ports (e.g. 3333 external, 30333 internal).
```tf
# Forward traffic to the worker backend address pool
resource "azurerm_lb_rule" "some-app-tcp" {
name = "some-app-tcp"
2024-07-06 02:21:50 +02:00
resource_group_name = module.ramius.resource_group_name
2019-07-30 07:41:10 +02:00
loadbalancer_id = module.ramius.loadbalancer_id
2024-07-06 02:21:50 +02:00
frontend_ip_configuration_name = "ingress-ipv4"
2019-07-30 07:41:10 +02:00
2024-07-06 02:21:50 +02:00
protocol = "Tcp"
frontend_port = 3333
backend_port = 30333
backend_address_pool_ids = module.ramius.backend_address_pool_ids.ipv4
probe_id = azurerm_lb_probe.some-app.id
2019-07-30 07:41:10 +02:00
}
# Health check some-app
resource "azurerm_lb_probe" "some-app" {
2024-07-06 02:21:50 +02:00
name = "some-app"
2019-07-30 07:41:10 +02:00
resource_group_name = module.ramius.resource_group_name
2024-07-06 02:21:50 +02:00
loadbalancer_id = module.ramius.loadbalancer_id
protocol = "Tcp"
port = 30333
2019-07-30 07:41:10 +02:00
}
```
## Firewalls
Add firewall rules to the worker security group.
```tf
resource "azurerm_network_security_rule" "some-app" {
2022-04-02 01:17:54 +02:00
name = "some-app"
2024-07-06 02:21:50 +02:00
resource_group_name = module.ramius.resource_group_name
2022-04-02 01:17:54 +02:00
network_security_group_name = module.ramius.worker_security_group_name
priority = "3001"
access = "Allow"
direction = "Inbound"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "30333"
source_address_prefix = "*"
2024-07-06 02:21:50 +02:00
destination_address_prefixes = module.ramius.worker_address_prefixes.ipv4
2019-07-30 07:41:10 +02:00
}
```
2018-10-28 22:17:12 +01:00
## IPv6
2019-07-30 07:41:10 +02:00
Azure does not provide public IPv6 addresses at the standard SKU.
2018-10-28 22:17:12 +01:00
| IPv6 Feature | Supported |
|-------------------------|-----------|
2024-07-06 02:21:50 +02:00
| Node IPv6 address | Yes |
| Node Outbound IPv6 | Yes |
| Kubernetes Ingress IPv6 | Yes |