1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/node-network-configuration-policy-file.adoc
2025-01-22 15:10:20 +00:00

30 lines
2.1 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/k8s_nmstate/k8s-observing-node-network-state.adoc
:_mod-docs-content-type: CONCEPT
[id="node-network-configuration-policy-file_{context}"]
= The NodeNetworkConfigurationPolicy manifest file
A `NodeNetworkConfigurationPolicy` (NNCP) manifest file defines policies that the Kubernetes NMState Operator uses to configure networking for nodes that exist in an {product-title} cluster.
After you apply a node network policy to a node, the Kubernetes NMState Operator creates an interface on the node. A node network policy includes your requested network configuration and the status of execution for the policy on the cluster as a whole.
You can create an NNCP by using either the {oc-first} or the {product-title} web console. As a postinstallation task you can create an NNCP or edit an existing NNCP.
[NOTE]
====
Before you create an NNCP, ensure that you read the "Example policy configurations for different interfaces" document.
====
If you want to delete an NNCP, you can use the `oc delete nncp` command to complete this action. However, this command does not delete any created objects, such as a bridge interface.
Deleting the node network policy that added an interface to a node does not change the configuration of the policy on the node. Similarly, removing an interface does not delete the policy, because the Kubernetes NMState Operator recreates the removed interface whenever a pod or a node is restarted.
To effectively delete the NNCP, the node network policy, and any created interfaces would typically require the following actions:
. Edit the NNCP and remove interface details from the file. Ensure that you do not remove `name`, `state`, and `type` parameters from the file.
. Add `state: absent` under the `interfaces.state` section of the NNCP.
. Run `oc apply -f <nncp_file_name>`. After the Kubernetes NMState Operator applies the node network policy to each node in your cluster, the interface that was previously created on each node is now marked _absent_.
. Run `oc delete nncp` to delete the NNCP.