// Module included in the following assemblies:
//
// * networking/k8s_nmstate/k8s-nmstate-updating-node-network-config.adoc

:_mod-docs-content-type: REFERENCE
[id="virt-example-bridge-nncp_{context}"]
= Example: Linux bridge interface node network configuration policy

[role="_abstract"]
You can create a Linux bridge interface on nodes in the cluster by applying a `NodeNetworkConfigurationPolicy` manifest
to the cluster.

The following YAML file is an example of a manifest for a Linux bridge interface.
It includes samples values that you must replace with your own information.

[source,yaml]
----
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: br1-eth1-policy
spec:
  nodeSelector:
    kubernetes.io/hostname: <node01>
  desiredState:
    interfaces:
      - name: br1
        description: Linux bridge with eth1 as a port
        type: linux-bridge
        state: up
        ipv4:
          dhcp: true
          enabled: true
        bridge:
          options:
            stp:
              enabled: false
          port:
            - name: eth1
----

* `metadata.name` defines the name of the policy.
* `spec.nodeSelector` defines  the nodes in the cluster the networking policy is applied to. If not defined, the default is all nodes.
* `spec.nodeSelector.kubernetes.io/hostname` uses a hostname node selector.
* `spec.desiredState.interfaces.name` defines the name of the interface.
* `spec.desiredState.interfaces.description` is optional and defines a human-readable description of the interface.
* `spec.desiredState.interfaces.type` defines the type of interface. This example creates a bridge.
* `spec.desiredState.interfaces.state` defines the requested state for the interface after creation.
* `spec.desiredState.interfaces.ipv4.dhcp` is optional. If you do not use `dhcp`, you can either set a static IP or leave the interface without an IP address.
* `spec.desiredState.interfaces.ipv4.enabled` defines that `ipv4` is enabled in this example.
* `spec.desiredState.interfaces.bridge.options.stp.enabled` defines that `stp` is disabled in this example.
* `spec.desiredState.interfaces.bridge.port.name` defines the node NIC to which the bridge attaches.
