Skip to content

Commit 301e0e6

Browse files
committed
OSDOCS-14866: correct typo and file errors NW docs MicroShift
1 parent 4cfcd31 commit 301e0e6

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

modules/microshift-multus-intro.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ All of the pods in the cluster still use the cluster-wide default network to mai
5050
* The CNI configuration is created when the {microshift-short} Multus DaemonSet starts. This configuration is autogenerated and includes the primary CNI that is the default delegate. For {microshift-short}, the default CNI is OVN-Kubernetes.
5151

5252
[id="microshift-additional-network-how-attached-pods_{context}"]
53-
== How to attached secondary networks to pods
53+
== How to attach secondary networks to pods
5454

5555
To attach secondary network interfaces to a pod, you must create and apply configurations that define how the interfaces are attached.
5656

modules/microshift-nw-multus-add-pod.adoc

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you want to attach additional networks to a pod that is already running, you
1212

1313
.Prerequisites
1414

15-
* The OpenShift CLI (`oc`) is installed.
15+
* The {oc-first} is installed.
1616
* The cluster is running.
1717
* A network defined by a `NetworkAttachmentDefinition` object that you want to attach the pod to exists.
1818
@@ -22,17 +22,16 @@ If you want to attach additional networks to a pod that is already running, you
2222

2323
.. To attach an additional network without any customization, add an annotation with the following format. Replace `_<network>_` with the name of the additional network to associate with the pod:
2424
+
25-
[source,yaml]
26-
[subs="+quotes"]
25+
[source,yaml,subs="+quotes"]
2726
----
2827
apiVersion: v1
2928
kind: Pod
3029
metadata:
3130
annotations:
32-
k8s.v1.cni.cncf.io/networks: __<network>__[,__<network>__,...] # <1>
31+
k8s.v1.cni.cncf.io/networks: _<network>_[,_<network>_,...] <1>
3332
# ...
3433
----
35-
<1> Replace `_<network>_` with the name of the additional network to associate with the pod. To specify more than one additional network, separate each network with a comma. Do not include whitespace between the comma. If you specify the same additional network multiple times, that pod will have multiple network interfaces attached to that network.
34+
<1> Replace `_<network>_` with the name of each additional network to associate with the pod. To specify more than one additional network, separate each network with a comma. Do not include whitespaces between the commas. If you specify the same additional network multiple times, that pod has multiple network interfaces attached to that network.
3635
+
3736
.Example annotation for a bridge-type additional network
3837
+
@@ -57,9 +56,9 @@ metadata:
5756
k8s.v1.cni.cncf.io/networks: |-
5857
[
5958
{
60-
"name": "<network>", # <1>
61-
"namespace": "<namespace>", # <2>
62-
"default-route": ["<default-route>"] # <3>
59+
"name": "<network>", <1>
60+
"namespace": "<namespace>", <2>
61+
"default-route": ["<default-route>"] <3>
6362
}
6463
]
6564
# ...
@@ -70,10 +69,9 @@ metadata:
7069

7170
. To create a `Pod` YAML file and add the `NetworkAttachmentDefinition` annotation for an additional network, run the following command and use the example YAML:
7271
+
73-
[source,terminal]
74-
[subs="+quotes"]
72+
[source,terminal,subs="+quotes"]
7573
----
76-
$ oc apply -f ./__<test_bridge>__.yaml <1>
74+
$ oc apply -f ./_<test_bridge>_.yaml <1>
7775
----
7876
<1> Replace `_<test_bridge>_` with the pod name that you want to use.
7977
+
@@ -132,21 +130,23 @@ metadata:
132130

133131
. Optional: To confirm that the `NetworkAttachmentDefinition` annotation exists in a `Pod` YAML, run the following command, replacing `_<name>_` with the name of the pod.
134132
+
135-
[source,terminal]
136-
[subs="+quotes"]
133+
[source,terminal,subs="+quotes"]
137134
----
138-
$ oc get pod __<name>__ -o yaml <1>
135+
$ oc get pod _<name>_ -o yaml <1>
139136
----
140137
<1> Replace `_<name>_` with the pod name you want to use. In the following example, `_<test_bridge>_` is used.
141138
+
142139
In the following example, the `test_bridge` is attached to the `net1` additional network:
143140
+
144-
[source,terminal]
145-
[subs="+quotes"]
141+
--
142+
[source,terminal,subs="+quotes"]
146143
----
147-
$ oc get pod __<test_bridge>__ -o yaml
144+
$ oc get pod _<test_bridge>_ -o yaml <1>
148145
----
146+
<1> Replace _<test_bridge>_ with the name of the bridge you want to use.
147+
--
149148
+
149+
--
150150
.Example output
151151
[source,yaml]
152152
----
@@ -155,7 +155,7 @@ kind: Pod
155155
metadata:
156156
annotations:
157157
k8s.v1.cni.cncf.io/networks: bridge-conf
158-
k8s.v1.cni.cncf.io/network-status: |- # <1>
158+
k8s.v1.cni.cncf.io/network-status: |- <1>
159159
[{
160160
"name": "ovn-kubernetes",
161161
"interface": "eth0",
@@ -181,6 +181,7 @@ status:
181181
# ...
182182
----
183183
<1> The `k8s.v1.cni.cncf.io/network-status` parameter is a JSON array of objects. Each object describes the status of an additional network attached to the pod. The annotation value is stored as a plain text value.
184+
--
184185

185186
. Verify that the pod is running by running the following command:
186187
+

0 commit comments

Comments
 (0)