You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nw-metallb-addresspool-cr.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ The default value is `true`.
45
45
46
46
|`spec.avoidBuggyIPs`
47
47
|`boolean`
48
-
|Optional: This ensures when enabled that IP addresses ending .0 and .255 are not allocated from the pool. The default value is `false`. Some older consumer network equipment mistakenly block IP addresses ending in .0 and .255.
48
+
|Optional: This ensures when enabled that IP addresses ending `.0` and `.255` are not allocated from the pool. The default value is `false`. Some older consumer network equipment mistakenly block IP addresses ending in `.0` and `.255`.
Copy file name to clipboardExpand all lines: modules/nw-metallb-configure-address-pool.adoc
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@ As a cluster administrator, you can add address pools to your cluster to control
7
7
.Prerequisites
8
8
9
9
* Install the OpenShift CLI (`oc`).
10
-
11
10
* Log in as a user with `cluster-admin` privileges.
12
11
13
12
.Procedure
@@ -27,6 +26,7 @@ spec:
27
26
addresses:
28
27
- 203.0.113.1-203.0.113.10
29
28
- 203.0.113.65-203.0.113.75
29
+
# ...
30
30
----
31
31
<1> This label assigned to the `IPAddressPool` can be referenced by the `ipAddressPoolSelectors` in the `BGPAdvertisement` CRD to associate the `IPAddressPool` with the advertisement.
The following examples show address pool configurations for specific scenarios.
10
+
8
11
== Example: IPv4 and CIDR ranges
9
12
10
-
You can specify a range of IP addresses in CIDR notation.
11
-
You can combine CIDR notation with the notation that uses a hyphen to separate lower and upper bounds.
13
+
You can specify a range of IP addresses in classless inter-domain routing (CIDR) notation. You can combine CIDR notation with the notation that uses a hyphen to separate lower and upper bounds.
12
14
13
15
[source,yaml]
14
16
----
@@ -22,13 +24,14 @@ spec:
22
24
- 192.168.100.0/24
23
25
- 192.168.200.0/24
24
26
- 192.168.255.1-192.168.255.5
27
+
# ...
25
28
----
26
29
27
-
== Example: Reserve IP addresses
30
+
== Example: Assign IP addresses
28
31
29
-
You can set the `autoAssign` field to `false` to prevent MetalLB from automatically assigning the IP addresses from the pool.
30
-
When you add a service, you can request a specific IP address from the pool or you can specify the pool name in an annotation to request any IP address from the pool.
32
+
You can set the `autoAssign` field to `false` to prevent MetalLB from automatically assigning IP addresses from the address pool. You can then assign a single IP address or multiple IP addresses from an IP address pool. To assign an IP address, append the `/32` CIDR notation to the target IP address in the `spec.addresses` parameter. This setting ensures that only the specific IP address is avilable for assignment, leaving non-reserved IP addresses for application use.
31
33
34
+
.Example `IPAddressPool` CR that assigns multiple IP addresses
32
35
[source,yaml]
33
36
----
34
37
apiVersion: metallb.io/v1beta1
@@ -38,17 +41,22 @@ metadata:
38
41
namespace: metallb-system
39
42
spec:
40
43
addresses:
41
-
- 10.0.100.0/28
44
+
- 192.168.100.1/32
45
+
- 192.168.200.1/32
42
46
autoAssign: false
47
+
# ...
43
48
----
44
49
50
+
[NOTE]
51
+
====
52
+
When you add a service, you can request a specific IP address from the address pool or you can specify the pool name in an annotation to request any IP address from the pool.
53
+
====
54
+
45
55
== Example: IPv4 and IPv6 addresses
46
56
47
-
You can add address pools that use IPv4 and IPv6.
48
-
You can specify multiple ranges in the `addresses` list, just like several IPv4 examples.
57
+
You can add address pools that use IPv4 and IPv6. You can specify multiple ranges in the `addresses` list, just like several IPv4 examples.
49
58
50
-
Whether the service is assigned a single IPv4 address, a single IPv6 address, or both is determined by how you add the service.
51
-
The `spec.ipFamilies` and `spec.ipFamilyPolicy` fields control how IP addresses are assigned to the service.
59
+
Whether the service is assigned a single IPv4 address, a single IPv6 address, or both is determined by how you add the service. The `spec.ipFamilies` and `spec.ipFamilyPolicy` fields control how IP addresses are assigned to the service.
52
60
53
61
[source,yaml]
54
62
----
@@ -59,11 +67,14 @@ metadata:
59
67
namespace: metallb-system
60
68
spec:
61
69
addresses:
62
-
- 10.0.100.0/28
70
+
- 10.0.100.0/28 <1>
63
71
- 2002:2:2::1-2002:2:2::100
72
+
# ...
64
73
----
74
+
<1> Where `10.0.100.0/28` is the local network IP address followed by the `/28` network prefix.
65
75
66
76
== Example: Assign IP address pools to services or namespaces
77
+
67
78
You can assign IP addresses from an `IPAddressPool` to services and namespaces that you specify.
68
79
69
80
If you assign a service or namespace to more than one IP address pool, MetalLB uses an available IP address from the higher-priority IP address pool. If no IP addresses are available from the assigned IP address pools with a high priority, MetalLB uses available IP addresses from an IP address pool with lower priority or no priority.
@@ -96,7 +107,8 @@ spec:
96
107
- key: security
97
108
operator: In
98
109
values:
99
-
- S1
110
+
- S1
111
+
# ...
100
112
----
101
113
<1> Assign a priority to the address pool. A lower number indicates a higher priority.
102
114
<2> Assign one or more namespaces to the IP address pool in a list format.
0 commit comments