Skip to content

Commit e2e1dbd

Browse files
authored
Merge pull request #76690 from rohennes/OCPBUGS-34644
OCPBUGS-34644: Adding IP address to example
2 parents 4cbc05f + 5304ae9 commit e2e1dbd

File tree

1 file changed

+35
-22
lines changed

1 file changed

+35
-22
lines changed

modules/nw-metallb-configure-return-traffic-proc.adoc

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This example associates a VRF routing table with MetalLB and an egress service t
2121

2222
* Install the OpenShift CLI (`oc`).
2323
* Log in as a user with `cluster-admin` privileges.
24+
* Install the Kubernetes NMState Operator.
25+
* Install the MetalLB Operator.
2426
2527
.Procedure
2628

@@ -40,37 +42,48 @@ spec:
4042
maxUnavailable: 3
4143
desiredState:
4244
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>
5162
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>
5869
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
6576
----
6677
<1> The name of the policy.
6778
<2> This example applies the policy to all nodes with the label `vrf:true`.
6879
<3> The name of the interface.
6980
<4> The type of interface. This example creates a VRF instance.
7081
<5> The node interface that the VRF attaches to.
7182
<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`.
7487

7588
.. Apply the policy by running the following command:
7689
+

0 commit comments

Comments
 (0)