Skip to content

Commit 10bd00f

Browse files
committed
[AKS] incorporate feedback for NSG rule
1 parent 5ffc4c9 commit 10bd00f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

articles/aks/load-balancer-standard.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ The following limitations apply when you create and manage AKS clusters that sup
5353
* You can only use one type of load balancer SKU (Basic or Standard) in a single cluster.
5454
* *Standard* SKU Load Balancers only support *Standard* SKU IP Addresses.
5555

56+
## Use the *Standard* SKU load balancer
57+
58+
When you create an AKS cluster, by default, the *Standard* SKU load balancer is used when you run services in that cluster. For example, [the quickstart using the Azure CLI][aks-quickstart-cli] deploys a sample application that uses the *Standard* SKU load balancer.
59+
5660
## Configure the load balancer to be internal
5761

5862
You can also configure the load balancer to be internal and not expose a public IP. To configure the load balancer as internal, add `service.beta.kubernetes.io/azure-load-balancer-internal: "true"` as an annotation to the *LoadBalancer* service. You can see an example yaml manifest as well as more details about an internal load balancer [here][internal-lb-yaml].
@@ -175,12 +179,34 @@ AllocatedOutboundPorts EnableTcpReset IdleTimeoutInMinutes Name
175179

176180
In the example output, *AllocatedOutboundPorts* is 0. The value for *AllocatedOutboundPorts* means that SNAT port allocation reverts to automatic assignment based on backend pool size. See [Load Balancer outbound rules][azure-lb-outbound-rules] and [Outbound connections in Azure][azure-lb-outbound-connections] for more details.
177181

182+
## Restrict access to specific IP ranges
183+
184+
The Network Security Group (NSG) associated with the virtual network for the load balancer, by default, has a rule to allow all inbound external traffic. You can update this rule to only allow specific IP ranges for inbound traffic. The following manifest uses *loadBalancerSourceRanges* to specify a new IP range for inbound external traffic:
185+
186+
```yaml
187+
apiVersion: v1
188+
kind: Service
189+
metadata:
190+
name: azure-vote-front
191+
spec:
192+
type: LoadBalancer
193+
ports:
194+
- port: 80
195+
selector:
196+
app: azure-vote-front
197+
loadBalancerSourceRanges:
198+
- MY_EXTERNAL_IP_RANGE
199+
```
200+
201+
The above example updates the rule to only allow inbound external traffic from the *MY_EXTERNAL_IP_RANGE* range. More information about using this method to restrict access to the load balancer service is available in the [Kubernetes documentation][kubernetes-cloud-provider-firewall].
202+
178203
## Next steps
179204
180205
Learn more about Kubernetes services at the [Kubernetes services documentation][kubernetes-services].
181206
182207
<!-- LINKS - External -->
183208
[kubectl]: https://kubernetes.io/docs/user-guide/kubectl/
209+
[kubernetes-cloud-provider-firewall]: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
184210
[kubectl-delete]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#delete
185211
[kubectl-get]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get
186212
[kubectl-apply]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply

0 commit comments

Comments
 (0)