Skip to content

Commit d783197

Browse files
committed
refactor for network event
1 parent 7a99e90 commit d783197

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

content/posts/2025-01-28-cli_use_cases.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Finally, you can add a node selector label on top
7676

7777
All together, the command to run flow capture with all the features on our pod IP will be:
7878
```sh
79-
oc netobserv flows --enable_all --peer_ip=10.129.0.48
79+
oc netobserv flows --enable_all --peer_ip=10.131.0.19
8080
```
8181

8282
The script will connect to your cluster and start deploying eBPF agents and collector pod:
@@ -101,7 +101,7 @@ opt: rtt_enable, value: true
101101
opt: network_events_enable, value: true
102102
opt: udn_enable, value: true
103103
opt: pkt_xlat_enable, value: true
104-
opt: filter_peer_ip, value: 10.129.0.48
104+
opt: filter_peer_ip, value: 10.129.0.19
105105
daemonset.apps/netobserv-cli created
106106
Waiting for daemon set "netobserv-cli" rollout to finish: 0 of 2 updated pods are available...
107107
Waiting for daemon set "netobserv-cli" rollout to finish: 1 of 2 updated pods are available...
@@ -121,7 +121,7 @@ Once that done, it will connect to the collector and display its output:
121121
122122
------------------------------------------------------------------------
123123
INFO[0000] Log level: info
124-
Option(s): enable_all|peer_ip=10.129.0.48
124+
Option(s): enable_all|peer_ip=10.129.0.19
125125
INFO[0000] Kernel version: 5.14.0-427.50.1.el9_4.x86_64
126126
INFO[0000] Starting Flow Capture...
127127
INFO[0000] Creating database...
@@ -133,12 +133,12 @@ INFO[0000] flows table created
133133
At this stage, the collector wait for incoming data. If nothing shows yet, it means that no traffic is captured. Try to open the route of your application or update the filters of the capture.
134134
135135
Once some traffic is captured, the output will look like:
136-
![cli dropped]({page.image('cli/connectivity-scenario-cli-dropped.png')})
136+
![cli network events]({page.image('cli/connectivity-scenario-cli-events.png')})
137137
138138
You can cycle to different views using left / right arrow keys and change the displayed enrichment colomns using page up / down ones.
139139
Also, to adapt to your screen height, you can increase / decrease the number of displayed flows using up / down arrow keys.
140140
141-
In this capture, we see that the traffic is blocked by OVS since it reports the `OVS_DROP_LAST_ACTION` drop cause. This probably means that a Network Policy is involved.
141+
In this capture, we see that the traffic is blocked by a network policy since it reports the `NetpolNamespace` network event.
142142
Edit your network policies and give another try.
143143
144144
Behind the scenes in our scenario, we used to have a deny all on the pod label:
@@ -147,7 +147,7 @@ kind: NetworkPolicy
147147
apiVersion: networking.k8s.io/v1
148148
metadata:
149149
name: deny-nodejs
150-
namespace: connectivity-scenario
150+
namespace: sample-app
151151
spec:
152152
podSelector:
153153
matchLabels:
@@ -158,9 +158,9 @@ spec:
158158
```
159159
160160
Once you updated your policies, you can give another try to your route until you fix the issue:
161-
![cli ok]({page.image('cli/connectivity-scenario-cli-ok.png')})
161+
![cli traffic]({page.image('cli/connectivity-scenario-cli-traffic.png')})
162162
163-
The drop cause will dissapear and your route should open correctly now. On top of that, you can ensure that the Round Trip Time is correct.
163+
The network event will dissapear and your route should open correctly now. On top of that, you can ensure that the Round Trip Time is correct.
164164
If you are still experienting issues with the route, you may update / get rid of the filter(s) and play with live filtering.
165165
166166
- While running a capture, you can place **additionnal live filters** to the view by simply typing keywords on your keyboard such as `nodejs`:
274 KB
Loading
273 KB
Loading

0 commit comments

Comments
 (0)