Skip to content

Commit

Permalink
hotfix(publick8s) correct outbound LB SNAT port (#580)
Browse files Browse the repository at this point in the history
Fixup of #579 

The documentation at
https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections#outboundrules
states

> Calculate ports per instance as follows:
> Number of frontend IPs * 64K / Number of backend instances


Today, it means: 64000/22 ( 2 node pools with max 10 nodes and 2 system
nodes) ~2909

(edit)

Fixes the following error from the apply of #579 

```text
Kubernetes Cluster Name: "publick8s-endless-ghoul"): managedclusters.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidLoadBalancerProfileAllocatedOutboundPorts" Message="Load balancer profile allocated ports 3200 is not in an allowable range given the number of nodes and IPs provisioned. Total node count 25 requires 80000 ports but only 64000 ports are available given 1 outbound public IPs. Refer to https://aka.ms/aks/slb-ports for more details." Target="networkProfile.loadBalancerProfile.allocatedOutboundPorts"
```
  • Loading branch information
dduportal authored Jan 17, 2024
1 parent a464e99 commit bf70b49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion publick8s.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ resource "azurerm_kubernetes_cluster" "publick8s" {
outbound_type = "loadBalancer"
load_balancer_sku = "standard"
load_balancer_profile {
outbound_ports_allocated = "3200"
outbound_ports_allocated = "2900"
idle_timeout_in_minutes = "4"
managed_outbound_ip_count = "1"
}
Expand Down

0 comments on commit bf70b49

Please sign in to comment.