If you’re interviewing for an OpenShift Architect/SRE role, knowing the oc commands for OVN-Kubernetes is extremely valuable. Below are the commands I would expect a senior OpenShift engineer to know.
1. Verify the Network Operator
oc get clusteroperator network
Healthy output:
NAME VERSION AVAILABLE PROGRESSING DEGRADEDnetwork 4.18.10 True False False
Detailed status:
oc describe clusteroperator network
2. Verify Network Operator Pods
oc get pods -n openshift-network-operator
Example:
network-operator-xxxxx Running
3. Check OVN Pods
oc get pods -n openshift-ovn-kubernetes
Typical output:
ovnkube-masterovnkube-nodeovnkube-control-planeovnkube-db
4. Show OVN Pods on Each Node
oc get pods -n openshift-ovn-kubernetes -o wide
This confirms every worker has an ovnkube-node pod.
5. Check OVN DaemonSet
oc get daemonset -n openshift-ovn-kubernetes
Example:
ovnkube-node
6. Check OVN Deployment
oc get deployment -n openshift-ovn-kubernetes
7. View OVN Logs
Node agent:
oc logs -n openshift-ovn-kubernetes <ovnkube-node-pod>
Master:
oc logs -n openshift-ovn-kubernetes <ovnkube-master-pod>
Previous container logs:
oc logs --previous
8. Describe an OVN Pod
oc describe pod <ovnkube-node-pod> \-n openshift-ovn-kubernetes
Useful for:
- Restarts
- Readiness
- Events
- Image versions
9. Check Node Network Status
oc get node
Detailed:
oc describe node worker-1
Look for:
NetworkUnavailable=FalseReady=True
10. Verify Pod IP Addresses
oc get pods -A -o wide
Example:
NAMESPACEPODIPNODE
Confirms OVN allocated IPs correctly.
11. Check Cluster Network
oc get network.config cluster -o yaml
Example:
clusterNetwork:- cidr: 10.128.0.0/14
12. View Network Operator Configuration
oc get networks.operator.openshift.io cluster -o yaml
Shows:
- MTU
- Geneve
- Service CIDR
- Cluster CIDR
13. Check Node MTU
Debug into a node:
oc debug node/<node-name>
Then:
chroot /host
Check:
ip link
or
ip addr
14. Check Geneve Interface
ip link | grep genev
Usually:
genev_sys_6081
15. Check Routing Table
ip route
16. Check OVS Bridges
ovs-vsctl show
Shows:
br-intbr-ex
17. Show OVS Interfaces
ovs-vsctl list interface
18. Show Open vSwitch Ports
ovs-vsctl show
or
ovs-ofctl show br-int
19. Verify Geneve Tunnel
ovs-vsctl show
Look for:
type=geneve
20. Verify Encapsulation
ovn-sbctl list encap
Should display:
geneve
21. Check OVN Northbound DB
ovn-nbctl show
Displays:
- Logical switches
- Routers
- ACLs
22. Check Southbound Database
ovn-sbctl show
Displays:
- Chassis
- Encapsulation
- Tunnel information
23. Verify Chassis Registration
ovn-sbctl list chassis
Every worker node should appear.
24. Check Pod Connectivity
oc exec -it <pod> -- ping <other-pod-ip>
25. DNS Test
oc exec -it <pod> -- nslookup kubernetes.default
26. Test Service
oc exec <pod> -- curl http://service-name
27. Check Network Policies
oc get networkpolicy -A
Describe one:
oc describe networkpolicy <policy>
28. Check Egress IP
oc get egressip -A
29. Check Egress Firewall
oc get egressfirewall -A
30. Observe Events
oc get events -A --sort-by=.metadata.creationTimestamp
31. Debug a Node
oc debug node/<node>
Then:
chroot /host
Useful commands:
journalctl -u ovnkube-nodejournalctl -u ovs-vswitchdjournalctl -u ovsdb-serverip routeip addrovs-vsctl show
32. Collect Network Must-Gather
oc adm must-gather
Network-focused:
oc adm must-gather \--image=registry.redhat.io/openshift4/network-tools-rhel8
Common Interview Scenario
Question: Pods on different worker nodes cannot communicate. How do you troubleshoot?
A structured approach is:
- Verify node health:
oc get nodes - Check OVN components:
oc get pods -n openshift-ovn-kubernetes - Review logs:
oc logs -n openshift-ovn-kubernetes <ovnkube-node-pod> - Test pod-to-pod connectivity:
oc exec <pod> -- ping <remote-pod-ip> - Inspect Geneve tunnels:
ovs-vsctl show - Confirm all chassis are registered:
ovn-sbctl list chassis - Verify there are no blocking
NetworkPolicy,EgressIP, orEgressFirewallresources. - If the issue persists, gather diagnostics with:
oc adm must-gather
These commands cover the majority of day-to-day OVN-Kubernetes troubleshooting tasks in OpenShift and are commonly discussed in senior platform engineering and architect interviews.