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/microshift-multus-intro.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ All of the pods in the cluster still use the cluster-wide default network to mai
50
50
* 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.
Copy file name to clipboardExpand all lines: modules/microshift-nw-multus-add-pod.adoc
+19-18Lines changed: 19 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ If you want to attach additional networks to a pod that is already running, you
12
12
13
13
.Prerequisites
14
14
15
-
* The OpenShift CLI (`oc`) is installed.
15
+
* The {oc-first} is installed.
16
16
* The cluster is running.
17
17
* A network defined by a `NetworkAttachmentDefinition` object that you want to attach the pod to exists.
18
18
@@ -22,17 +22,16 @@ If you want to attach additional networks to a pod that is already running, you
22
22
23
23
.. 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:
<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.
36
35
+
37
36
.Example annotation for a bridge-type additional network
38
37
+
@@ -57,9 +56,9 @@ metadata:
57
56
k8s.v1.cni.cncf.io/networks: |-
58
57
[
59
58
{
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>
63
62
}
64
63
]
65
64
# ...
@@ -70,10 +69,9 @@ metadata:
70
69
71
70
. To create a `Pod` YAML file and add the `NetworkAttachmentDefinition` annotation for an additional network, run the following command and use the example YAML:
72
71
+
73
-
[source,terminal]
74
-
[subs="+quotes"]
72
+
[source,terminal,subs="+quotes"]
75
73
----
76
-
$ oc apply -f ./__<test_bridge>__.yaml <1>
74
+
$ oc apply -f ./_<test_bridge>_.yaml <1>
77
75
----
78
76
<1> Replace `_<test_bridge>_` with the pod name that you want to use.
79
77
+
@@ -132,21 +130,23 @@ metadata:
132
130
133
131
. Optional: To confirm that the `NetworkAttachmentDefinition` annotation exists in a `Pod` YAML, run the following command, replacing `_<name>_` with the name of the pod.
134
132
+
135
-
[source,terminal]
136
-
[subs="+quotes"]
133
+
[source,terminal,subs="+quotes"]
137
134
----
138
-
$ oc get pod __<name>__ -o yaml <1>
135
+
$ oc get pod _<name>_ -o yaml <1>
139
136
----
140
137
<1> Replace `_<name>_` with the pod name you want to use. In the following example, `_<test_bridge>_` is used.
141
138
+
142
139
In the following example, the `test_bridge` is attached to the `net1` additional network:
143
140
+
144
-
[source,terminal]
145
-
[subs="+quotes"]
141
+
--
142
+
[source,terminal,subs="+quotes"]
146
143
----
147
-
$ oc get pod __<test_bridge>__ -o yaml
144
+
$ oc get pod _<test_bridge>_ -o yaml <1>
148
145
----
146
+
<1> Replace _<test_bridge>_ with the name of the bridge you want to use.
147
+
--
149
148
+
149
+
--
150
150
.Example output
151
151
[source,yaml]
152
152
----
@@ -155,7 +155,7 @@ kind: Pod
155
155
metadata:
156
156
annotations:
157
157
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>
159
159
[{
160
160
"name": "ovn-kubernetes",
161
161
"interface": "eth0",
@@ -181,6 +181,7 @@ status:
181
181
# ...
182
182
----
183
183
<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
+
--
184
185
185
186
. Verify that the pod is running by running the following command:
0 commit comments