Skip to content

Commit f318aa2

Browse files
authored
Merge pull request #103580 from stevsmit/16834-416-cp
[enterprise-4.16] ADV error resolution for MNW
2 parents 34df6bc + 7567af6 commit f318aa2

9 files changed

+89
-75
lines changed

modules/nw-multus-add-pod.adoc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ endif::sriov[]
6060
6161
. Add an annotation to the `Pod` object. Only one of the following annotation formats can be used:
6262
+
63-
.. To attach a secondary network without any customization, add an annotation with the following format. Replace `<network>` with the name of the secondary network to associate with the pod:
63+
.. To attach a secondary network without any customization, add an annotation with the following format:
6464
+
6565
[source,yaml]
6666
----
@@ -71,7 +71,7 @@ metadata:
7171
+
7272
where:
7373
+
74-
`k8s.v1.cni.cncf.io/networks`:: To specify more than one secondary network, separate each network with a comma. Do not include whitespace between the comma. If you specify the same secondary network multiple times, that pod will have multiple network interfaces attached to that network.
74+
`k8s.v1.cni.cncf.io/networks`:: Specifies the name of the secondary network to associate with the pod. To specify more than one secondary network, separate each network with a comma. Do not include whitespace between the comma. If you specify the same secondary network multiple times, that pod will have multiple network interfaces attached to that network.
7575
+
7676
.. To attach a secondary network with customizations, add an annotation with the following format:
7777
+
@@ -91,18 +91,20 @@ metadata:
9191
+
9292
where:
9393
+
94-
`name`:: Specify the name of the secondary network defined by a `NetworkAttachmentDefinition` object.
95-
`namespace`:: Specify the namespace where the `NetworkAttachmentDefinition` object is defined.
96-
`default-route`:: Optional parameter. Specify an override for the default route, such as `192.168.17.1`.
94+
`name`:: Specifies the name of the secondary network defined by a `NetworkAttachmentDefinition` object.
95+
`namespace`:: Specifies the namespace where the `NetworkAttachmentDefinition` object is defined.
96+
`default-route`:: Optional parameter. Specifies an override for the default route, such as `192.168.17.1`.
9797
98-
. To create the pod, enter the following command. Replace `<name>` with the name of the pod.
98+
. Create the pod by entering the following command.
9999
+
100100
[source,terminal]
101101
----
102102
$ oc create -f <name>.yaml
103103
----
104+
+
105+
Replace `<name>` with the name of the pod.
104106
105-
. Optional: To Confirm that the annotation exists in the `Pod` CR, enter the following command, replacing `<name>` with the name of the pod.
107+
. Optional: Confirm that the annotation exists in the `pod` CR by entering the following command. Replace `<name>` with the name of the pod.
106108
+
107109
[source,terminal]
108110
----
@@ -148,7 +150,7 @@ status:
148150
+
149151
where:
150152
+
151-
`k8s.v1.cni.cncf.io/network-status`:: The `k8s.v1.cni.cncf.io/network-status` parameter is a JSON array of
153+
`k8s.v1.cni.cncf.io/network-status`:: Specifies a JSON array of
152154
objects. Each object describes the status of a secondary network attached
153155
to the pod. The annotation value is stored as a plain text value.
154156

modules/nw-multus-advanced-annotations.adoc

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
[id="nw-multus-advanced-annotations_{context}"]
77
= Specifying pod-specific addressing and routing options
88

9-
When attaching a pod to an additional network, you may want to specify further properties
10-
about that network in a particular pod. This allows you to change some aspects of routing, as well
11-
as specify static IP addresses and MAC addresses. To accomplish this, you can use the JSON formatted annotations.
9+
[role="_abstract"]
10+
You can configure pod-specific addressing and routing options by using JSON-formatted annotations.
11+
Configuring these options enables you to set static IP addresses, MAC addresses, and default routes for the pod.
1212

1313
.Prerequisites
1414

@@ -21,8 +21,6 @@ endif::sriov[]
2121
2222
.Procedure
2323

24-
To add a pod to an additional network while specifying addressing and/or routing options, complete the following steps:
25-
2624
. Edit the `Pod` resource definition. If you are editing an existing `Pod` resource, run the
2725
following command to edit its definition in the default editor. Replace `<name>`
2826
with the name of the `Pod` resource to edit.
@@ -65,8 +63,8 @@ metadata:
6563
"name": "net1"
6664
},
6765
{
68-
"name": "net2", <1>
69-
"default-route": ["192.0.2.1"] <2>
66+
"name": "net2",
67+
"default-route": ["192.0.2.1"]
7068
}]'
7169
spec:
7270
containers:
@@ -78,9 +76,9 @@ spec:
7876
--
7977
where:
8078

81-
`name`:: The `name` key is the name of the secondary network to associate
79+
`name`:: Specifies the name of the secondary network to associate
8280
with the pod.
83-
`default-route`:: The `default-route` key specifies a value of a gateway for traffic to be routed over if no other routing entry is present in the routing table. If more than one `default-route` key is specified, this will cause the pod to fail to become active.
81+
`default-route`:: Specifies a value of a gateway for traffic to be routed over if no other routing entry is present in the routing table. If more than one `default-route` key is specified, this will cause the pod to fail to become active.
8482
--
8583
+
8684
The default route will cause any traffic that is not specified in other routes to be routed to the gateway.
@@ -118,9 +116,9 @@ The following YAML describes the configuration parameters for the CNO:
118116
.Cluster Network Operator YAML configuration
119117
[source,yaml]
120118
----
121-
name: <name> <1>
122-
namespace: <namespace> <2>
123-
rawCNIConfig: '{ <3>
119+
name: <name>
120+
namespace: <namespace>
121+
rawCNIConfig: '{
124122
...
125123
}'
126124
type: Raw
@@ -129,9 +127,9 @@ type: Raw
129127
--
130128
where:
131129

132-
`name`:: Specify a name for the secondary network attachment that you are creating. The name must be unique within the specified `namespace`.
133-
`namespace`:: Specify the namespace to create the network attachment in. If you do not specify a value, then the `default` namespace is used.
134-
`rawCNIConfig`:: Specify the CNI plugin configuration in JSON format, which is based on the following template.
130+
`name`:: Specifies a name for the secondary network attachment that you are creating. The name must be unique within the specified `namespace`.
131+
`namespace`:: Specifies the namespace to create the network attachment in. If you do not specify a value, then the `default` namespace is used.
132+
`rawCNIConfig`:: Specifies the CNI plugin configuration in JSON format, which is based on the following template.
135133
--
136134
+
137135
The following object describes the configuration parameters for utilizing static MAC address and IP address using the macvlan CNI plugin:
@@ -141,17 +139,17 @@ The following object describes the configuration parameters for utilizing static
141139
----
142140
{
143141
"cniVersion": "0.3.1",
144-
"name": "<name>", <1>
145-
"plugins": [{ <2>
142+
"name": "<name>",
143+
"plugins": [{
146144
"type": "macvlan",
147-
"capabilities": { "ips": true }, <3>
148-
"master": "eth0", <4>
145+
"capabilities": { "ips": true },
146+
"master": "eth0",
149147
"mode": "bridge",
150148
"ipam": {
151149
"type": "static"
152150
}
153151
}, {
154-
"capabilities": { "mac": true }, <5>
152+
"capabilities": { "mac": true },
155153
"type": "tuning"
156154
}]
157155
}
@@ -168,8 +166,9 @@ where:
168166
--
169167
+
170168
The above network attachment can be referenced in a JSON formatted annotation, along with keys to specify which static IP and MAC address will be assigned to a given pod.
171-
+
172-
Edit the pod with:
169+
170+
171+
. Edit the pod by entering the following command:
173172
+
174173
[source,terminal]
175174
----
@@ -187,24 +186,22 @@ metadata:
187186
annotations:
188187
k8s.v1.cni.cncf.io/networks: '[
189188
{
190-
"name": "<name>", <1>
191-
"ips": [ "192.0.2.205/24" ], <2>
192-
"mac": "CA:FE:C0:FF:EE:00" <3>
189+
"name": "<name>",
190+
"ips": [ "192.0.2.205/24" ],
191+
"mac": "CA:FE:C0:FF:EE:00"
193192
}
194193
]'
195194
----
196-
<1> Use the `<name>` as provided when creating the `rawCNIConfig` above.
197-
<2> Provide an IP address including the subnet mask.
198-
<3> Provide the MAC address.
195+
+
196+
--
197+
where:
198+
199+
`name`:: Specifies the name for the secondary network attachment to create. The name must be unique within the specified `namespace`.
200+
`ips`:: Specifies an IP address including the subnet mask.
201+
`mac`:: Specifies the MAC address.
202+
--
199203
+
200204
[NOTE]
201205
====
202-
Static IP addresses and MAC addresses do not have to be used at the same time, you may use them individually, or together.
206+
Static IP addresses and MAC addresses do not have to be used at the same time. You can use them individually, or together.
203207
====
204-
+
205-
. To verify the IP address and MAC properties of a pod with secondary networks, use the `oc` command to execute the ip command within a pod.
206-
+
207-
[source,terminal]
208-
----
209-
$ oc exec -it <pod_name> -- ip a
210-
----

modules/nw-multus-delete-network.adoc

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
[id="nw-multus-delete-network_{context}"]
77
= Removing an additional network attachment definition
88

9-
As a cluster administrator, you can remove an additional network from your
10-
{product-title} cluster. The additional network is not removed from any pods it
11-
is attached to.
9+
[role="_abstract"]
10+
As a cluster administrator, you can remove a secondary network from your {product-title} cluster. The secondary network is not removed from any pods that it is attached to.
1211

1312
.Prerequisites
1413

@@ -17,10 +16,7 @@ is attached to.
1716
1817
.Procedure
1918

20-
To remove an additional network from your cluster, complete the following steps:
21-
22-
. Edit the Cluster Network Operator (CNO) in your default text editor by running
23-
the following command:
19+
. Edit the Cluster Network Operator (CNO) in your default text editor by running the following command:
2420
+
2521
[source,terminal]
2622
----
@@ -37,11 +33,23 @@ kind: Network
3733
metadata:
3834
name: cluster
3935
spec:
40-
additionalNetworks: [] <1>
36+
additionalNetworks: []
4137
----
42-
<1> If you are removing the configuration mapping for the only additional
43-
network attachment definition in the `additionalNetworks` collection, you must
44-
specify an empty collection.
38+
+
39+
--
40+
where:
41+
42+
`additionalNetworks`:: Specifies the secondary network attachment definition that you want to remove from the `additionalNetworks` collection. If you are removing the configuration mapping for the only secondary network attachment definition in the `additionalNetworks` collection, you must specify an empty collection.
43+
--
44+
45+
. Remove a network attachment definition from the network of your cluster by entering the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ oc delete net-attach-def <name_of_network_attachment_definition>
50+
----
51+
+
52+
Replace `<name_of_network_attachment_definition>` with the name of the network attachment definition that you want to remove.
4553

4654
. Save your changes and quit the text editor to commit your changes.
4755

modules/nw-multus-edit-network.adoc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
[id="nw-multus-edit-network_{context}"]
77
= Modifying an additional network attachment definition
88

9-
As a cluster administrator, you can make changes to an existing additional
10-
network. Any existing pods attached to the additional network will not be updated.
9+
[role="_abstract"]
10+
You can modify a secondary network attachment definition.
11+
You modify the attachment definition to update network settings or change network parameters.
1112

1213
.Prerequisites
1314

@@ -17,26 +18,22 @@ network. Any existing pods attached to the additional network will not be update
1718
1819
.Procedure
1920

20-
To edit an additional network for your cluster, complete the following steps:
21-
22-
. Run the following command to edit the Cluster Network Operator (CNO) CR in
23-
your default text editor:
21+
. Edit the Cluster Network Operator (CNO) CR in your default text editor by running the following command:
2422
+
2523
[source,terminal]
2624
----
2725
$ oc edit networks.operator.openshift.io cluster
2826
----
2927

30-
. In the `additionalNetworks` collection, update the additional network with
31-
your changes.
28+
. In the `additionalNetworks` collection, update the secondary network with your changes.
3229

3330
. Save your changes and quit the text editor to commit your changes.
3431

35-
. Optional: Confirm that the CNO updated the `NetworkAttachmentDefinition` object by running the following command. Replace `<network-name>` with the name of the additional network to display. There might be a delay before the CNO updates the `NetworkAttachmentDefinition` object to reflect your changes.
32+
. Optional: Confirm that the CNO updated the `NetworkAttachmentDefinition` object by running the following command. Replace `<network_name>` with the name of the secondary network to display. There might be a delay before the CNO updates the `NetworkAttachmentDefinition` object to reflect your changes.
3633
+
3734
[source,terminal]
3835
----
39-
$ oc get network-attachment-definitions <network-name> -o yaml
36+
$ oc get network-attachment-definitions <network_name> -o yaml
4037
----
4138
+
4239
For example, the following console output displays a `NetworkAttachmentDefinition` object that is named `net1`:

modules/nw-multus-remove-pod.adoc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
// * networking/multiple_networks/removing-pod.adoc
44
// * microshift_networking/microshift_multiple_networks/microshift-cni-multus-using.adoc
55

6-
76
:_mod-docs-content-type: PROCEDURE
87
[id="nw-multus-remove-pod_{context}"]
98
= Removing a pod from an additional network
109

11-
You can remove a pod from an additional network only by deleting the pod.
10+
[role="_abstract"]
11+
You can remove a pod from a secondary network.
12+
You remove pods from secondary networks to disconnect them from specific network configurations.
1213

1314
.Prerequisites
1415

@@ -18,14 +19,16 @@ You can remove a pod from an additional network only by deleting the pod.
1819
1920
.Procedure
2021

21-
* To delete the pod, enter the following command:
22+
* Delete the pod by entering the following command:
2223
+
2324
[source,terminal]
2425
----
2526
$ oc delete pod <name> -n <namespace>
2627
----
2728
+
2829
--
29-
* `<name>` is the name of the pod.
30-
* `<namespace>` is the namespace that contains the pod.
30+
where:
31+
32+
`<name>`:: Specifies the name of the pod.
33+
`<namespace>`:: Specifies the namespace that contains the pod.
3134
--

networking/multiple_networks/attaching-pod.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
As a cluster user you can attach a pod to an additional network.
9+
[role="_abstract"]
10+
You can attach a pod to a secondary network.
11+
Attaching a pod to a secondary network enables the pod to use additional network interfaces beyond the primary cluster network.
1012

1113
include::modules/nw-multus-add-pod.adoc[leveloffset=+1]
1214
include::modules/nw-multus-advanced-annotations.adoc[leveloffset=+2]

networking/multiple_networks/edit-additional-network.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
As a cluster administrator you can modify the configuration for an existing
10-
additional network.
9+
[role="_abstract"]
10+
You can modify the configuration for an existing secondary network.
11+
You modify secondary networks to update network settings or change network parameters.
1112

1213
include::modules/nw-multus-edit-network.adoc[leveloffset=+1]

networking/multiple_networks/remove-additional-network.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
As a cluster administrator you can remove an additional network attachment.
9+
[role="_abstract"]
10+
You can remove an additional network attachment.
11+
You remove additional networks to clean up unused network configurations or free up network resources.
1012

1113
include::modules/nw-multus-delete-network.adoc[leveloffset=+1]

networking/multiple_networks/removing-pod.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
As a cluster user you can remove a pod from an additional network.
9+
[role="_abstract"]
10+
You can remove a pod from a secondary network.
11+
You remove pods from secondary networks to disconnect them from specific network configurations.
1012

1113
include::modules/nw-multus-remove-pod.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)