Fix to add all Azure controller nodes to address pool

* Add all Azure controllers to the apiserver load balancer
backend address pool
* Previously, kube-apiserver availability relied on the 0th
controller being up. Multi-controller was just providing etcd
data redundancy
This commit is contained in:
Dalton Hubble
2019-07-21 10:32:58 -07:00
parent f543f08867
commit c8df349e55
2 changed files with 8 additions and 1 deletions

View File

@ -114,7 +114,9 @@ resource "azurerm_network_interface" "controllers" {
# Add controller NICs to the controller backend address pool
resource "azurerm_network_interface_backend_address_pool_association" "controllers" {
network_interface_id = azurerm_network_interface.controllers[0].id
count = var.controller_count
network_interface_id = azurerm_network_interface.controllers[count.index].id
ip_configuration_name = "ip0"
backend_address_pool_id = azurerm_lb_backend_address_pool.controller.id
}