mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 09:46:53 +01:00
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
:_mod-docs-content-type: PROCEDURE
|
|
[id="installation-osp-dpdk-exposing-host-interface_{context}"]
|
|
= Exposing the host-device interface to the pod
|
|
|
|
You can use the Container Network Interface (CNI) plugin to expose an interface that is on the host to the pod. The plugin moves the interface from the namespace of the host network to the namespace of the pod. The pod then has direct control of the interface.
|
|
|
|
.Procedure
|
|
|
|
* Create an additional network attachment with the host-device CNI plugin by using the following object as an example:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: k8s.cni.cncf.io/v1
|
|
kind: NetworkAttachmentDefinition
|
|
metadata:
|
|
name: vhostuser1
|
|
namespace: default
|
|
spec:
|
|
config: '{ "cniVersion": "0.3.1", "name": "hostonly", "type": "host-device", "pciBusId": "0000:00:04.0", "ipam": { } }'
|
|
----
|
|
|
|
.Verification
|
|
|
|
* From a command line, run the following command to see if networks are created in the namespace:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n <your_cnf_namespace> get net-attach-def
|
|
---- |