You can call ovn-kubernetes tools from an MCP client to inspect OVN and Open vSwitch state on OKD.
Unless noted otherwise, OVN-layer tools default the pod namespace to openshift-ovn-kubernetes. Supply the ovnkube-node pod name. Discover pods with the core toolset pods_list tool and a label selector such as app=ovnkube-node.
Table 1. OVN layer tools
| Tool |
Key parameters and use |
ovn_show
|
Set database to nbdb (ovn-nbctl show) or sbdb (ovn-sbctl show). |
ovn_get
|
Requires database and table. database accepts only nbdb or sbdb. Optional record, columns, and pattern filters. |
ovn_lflow_list
|
Optional datapath and pattern filters for Southbound logical flows. |
ovn_trace
|
Requires datapath and microflow. Optional mode: detailed, summary, or minimal. |
Common Northbound tables for ovn_get include Logical_Switch, Logical_Router, Logical_Switch_Port, Logical_Router_Port, ACL, Address_Set, Port_Group, Load_Balancer, and NAT.
Common Southbound tables include Chassis, Port_Binding, Datapath_Binding, Logical_Flow, MAC_Binding, Multicast_Group, and SB_Global.
Table 2. OVS layer tools
| Tool |
Key parameters and use |
ovs_vsctl
|
Set action to show, list-br, list-ports, or list-ifaces. For list-ports and list-ifaces, set bridge (for example, br-int). |
ovs_ofctl
|
Set action to dump-flows and provide bridge. Optional pattern filters output lines. |
ovs_appctl
|
Set action to dpctl/dump-conntrack or ofproto/trace. For ofproto/trace, set bridge and flow. |
For OVS-layer tools, set namespace to openshift-ovn-kubernetes and name to the ovnkube-node pod on the target node. Optional head, tail, and apply_tail_first parameters limit output size.