Skip to content

Commit 8ae7226

Browse files
BZ1966642: updated load balancer source range documentation
1 parent fc6b6c8 commit 8ae7226

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

modules/nw-create-load-balancer-service.adoc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,24 @@ spec:
3838
- name: db
3939
port: 3306 <2>
4040
loadBalancerIP:
41-
type: LoadBalancer <3>
41+
loadBalancerSourceRanges: <3>
42+
- 10.0.0.0/8
43+
- 192.168.0.0/16
44+
type: LoadBalancer <4>
4245
selector:
43-
name: mysql <4>
46+
name: mysql <5>
4447
----
4548
<1> Enter a descriptive name for the load balancer service.
4649
<2> Enter the same port that the service you want to expose is listening on.
47-
<3> Enter `loadbalancer` as the type.
48-
<4> Enter the name of the service.
49-
50+
<3> Enter a list of specific IP addresses to restrict traffic through the load balancer. This field is ignored if the cloud-provider does not support the feature.
51+
<4> Enter `Loadbalancer` as the type.
52+
<5> Enter the name of the service.
53+
+
54+
[NOTE]
55+
====
56+
To restrict traffic through the load balancer to specific IP addresses, it is recommended to use the `service.beta.kubernetes.io/load-balancer-source-ranges` annotation rather than setting the `loadBalancerSourceRanges` field.
57+
With the annotation, you can more easily migrate to the OpenShift API, which will be implemented in a future release.
58+
====
5059
. Save and exit the file.
5160

5261
. Run the following command to create the service:

0 commit comments

Comments
 (0)