You can remove an interface from one or more nodes in the cluster by editing the
NodeNetworkConfigurationPolicy object and setting the
state of the interface to
Removing an interface from a node does not automatically restore the node network configuration to a previous state. If you want to restore the previous state, you will need to define that node network configuration in the policy.
If you remove a bridge or bonding interface, any node NICs in the cluster that were previously attached or subordinate to that bridge or bonding interface are placed in a
down state and become unreachable. To avoid losing connectivity, configure the node NIC in the same policy so that it has a status of
up and either DHCP or a static IP address.
Deleting the node network policy that added an interface does not change the configuration of the policy on the node.
NodeNetworkConfigurationPolicy is an object in the cluster, it only represents the requested configuration.
Similarly, removing an interface does not delete the policy.
NodeNetworkConfigurationPolicy manifest used to create the interface. The following example removes a Linux bridge and configures the
eth1 NIC with DHCP to avoid losing connectivity:
name: <br1-eth1-policy> (1)
node-role.kubernetes.io/worker: "" (3)
- name: br1
state: absent (4)
- name: eth1 (5)
type: ethernet (6)
state: up (7)
dhcp: true (8)
enabled: true (9)
||Name of the policy.
||Optional: If you do not include the
nodeSelector parameter, the policy applies to all nodes in the cluster.
||This example uses the
node-role.kubernetes.io/worker: "" node selector to select all worker nodes in the cluster.
||Changing the state to
absent removes the interface.
||The name of the interface that is to be unattached from the bridge interface.
||The type of interface. This example creates an Ethernet networking interface.
||The requested state for the interface.
||Optional: If you do not use
dhcp, you can either set a static IP or leave the interface without an IP address.
ipv4 in this example.
Update the policy on the node and remove the interface:
$ oc apply -f <br1-eth1-policy.yaml> (1)
||File name of the policy manifest.