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-configure-return-traffic-proc.adoc
+35-22Lines changed: 35 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ This example associates a VRF routing table with MetalLB and an egress service t
21
21
22
22
* Install the OpenShift CLI (`oc`).
23
23
* Log in as a user with `cluster-admin` privileges.
24
+
* Install the Kubernetes NMState Operator.
25
+
* Install the MetalLB Operator.
24
26
25
27
.Procedure
26
28
@@ -40,37 +42,48 @@ spec:
40
42
maxUnavailable: 3
41
43
desiredState:
42
44
interfaces:
43
-
- name: ens4vrf <3>
44
-
type: vrf <4>
45
-
state: up
46
-
vrf:
47
-
port:
48
-
- ens4 <5>
49
-
route-table-id: 2 <6>
50
-
routes: <7>
45
+
- name: ens4vrf <3>
46
+
type: vrf <4>
47
+
state: up
48
+
vrf:
49
+
port:
50
+
- ens4 <5>
51
+
route-table-id: 2 <6>
52
+
- name: ens4 <7>
53
+
type: ethernet
54
+
state: up
55
+
ipv4:
56
+
address:
57
+
- ip: 192.168.130.130
58
+
prefix-length: 24
59
+
dhcp: false
60
+
enabled: true
61
+
routes: <8>
51
62
config:
52
-
- destination: 0.0.0.0/0
53
-
metric: 150
54
-
next-hop-address: 192.168.130.1
55
-
next-hop-interface: ens4
56
-
table-id: 2
57
-
route-rules: <8>
63
+
- destination: 0.0.0.0/0
64
+
metric: 150
65
+
next-hop-address: 192.168.130.1
66
+
next-hop-interface: ens4
67
+
table-id: 2
68
+
route-rules: <9>
58
69
config:
59
-
- ip-to: 172.30.0.0/16
60
-
priority: 998
61
-
route-table: 254
62
-
- ip-to: 10.132.0.0/14
63
-
priority: 998
64
-
route-table: 254
70
+
- ip-to: 172.30.0.0/16
71
+
priority: 998
72
+
route-table: 254 <10>
73
+
- ip-to: 10.132.0.0/14
74
+
priority: 998
75
+
route-table: 254
65
76
----
66
77
<1> The name of the policy.
67
78
<2> This example applies the policy to all nodes with the label `vrf:true`.
68
79
<3> The name of the interface.
69
80
<4> The type of interface. This example creates a VRF instance.
70
81
<5> The node interface that the VRF attaches to.
71
82
<6> The name of the route table ID for the VRF.
72
-
<7> Defines the configuration for network routes. The `next-hop-address` field defines the IP address of the next hop for the route. The `next-hop-interface` field defines the outgoing interface for the route. In this example, the VRF routing table is `2`, which references the ID that you define in the `EgressService` CR.
73
-
<8> Defines additional route rules. The `ip-to` fields must match the `Cluster Network` CIDR and `Service Network` CIDR. You can view the values for these CIDR address specifications by running the following command: `oc describe network.config/cluster`.
83
+
<7> The IPv4 address of the interface associated with the VRF.
84
+
<8> Defines the configuration for network routes. The `next-hop-address` field defines the IP address of the next hop for the route. The `next-hop-interface` field defines the outgoing interface for the route. In this example, the VRF routing table is `2`, which references the ID that you define in the `EgressService` CR.
85
+
<9> Defines additional route rules. The `ip-to` fields must match the `Cluster Network` CIDR and `Service Network` CIDR. You can view the values for these CIDR address specifications by running the following command: `oc describe network.config/cluster`.
86
+
<10> The main routing table that the Linux kernel uses when calculating routes has the ID `254`.
74
87
75
88
.. Apply the policy by running the following command:
0 commit comments