1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 09:46:53 +01:00
Files
openshift-docs/modules/virt-removing-interface-from-nodes.adoc

49 lines
1.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * virt/node_network/virt-updating-node-network-config.adoc
[id="virt-removing-interface-from-nodes_{context}"]
= Removing an interface from nodes
Remove an interface from nodes by editing the `NodeNetworkConfigurationPolicy` object and set
the `state` of the interface to `absent`.
[NOTE]
====
Deleting the node network policy that added an interface does not change the configuration of the policy on the node.
Although a `NodeNetworkConfigurationPolicy` is an object in the cluster, it only represents the requested configuration. +
Similarly, removing an interface does not delete the policy.
====
.Procedure
. Update the `NodeNetworkConfigurationPolicy` manifest used to create the interface. The following example removes a Linux bridge:
+
[source,yaml]
----
apiVersion: nmstate.io/v1alpha1
kind: NodeNetworkConfigurationPolicy
metadata:
name: <br1-eth1-policy> <1>
spec:
nodeSelector: <2>
node-role.kubernetes.io/worker: "" <3>
desiredState:
interfaces:
- name: br1
type: linux-bridge
state: absent <4>
----
<1> Name of the policy.
<2> Optional: If you do not include the `nodeSelector` parameter, the policy applies to all nodes in the cluster.
<3> This example uses the `node-role.kubernetes.io/worker: ""` node selector to select all worker nodes in the cluster.
<4> Changing the state to `absent` removes the interface.
. Update the policy on the node and remove the interface:
+
[source,terminal]
----
$ oc apply -f <br1-eth1-policy.yaml> <1>
----
<1> File name of the policy manifest.