You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/posts/2025-01-28-cli_use_cases.md
+32-4Lines changed: 32 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,37 @@ LAST SEEN TYPE REASON OBJECT MESSAGE
40
40
0s Normal Started Pod/collector Started container collector
41
41
```
42
42
43
+
## North / South and East / West traffic
44
+
The CLI is able to read configurations from `cluster-config-v1` and `network` to identify **Machine**, **Pods**, and **Services** subnets using the `--get-subnets` option. This will automatically add `SrcSubnetLabel` and `DstSubnetLabel` to your flows.
45
+
46
+
You will see subnets being configured during the creation of the agents:
47
+
```sh
48
+
creating flow-capture agents:
49
+
opt: get_subnets, value: true
50
+
Found subnets:
51
+
Services: "172.30.0.0/16"
52
+
Pods: "10.128.0.0/14"
53
+
Machines: "10.0.0.0/16"
54
+
```
55
+
56
+
Once running, you can cycle to different views using left / right arrow keys and change the displayed enrichment colomns using page up / down ones.
57
+
Also, to adapt to your screen height, you can increase / decrease the number of displayed flows using up / down arrow keys.
58
+
59
+
})
60
+
61
+
You can live filter this capture by typing Machines / Pods or Services keyword to only see what you look for here.
62
+
63
+
However, if you want to capture only a subset of these flows, you can use the regexes filter on top such as:
**WARNING: Running regexes filters means that all the flows are captured and enriched before applying this filter stage in the pipeline. To avoid performance impact on your cluster, use eBPF filters such as IPs, Ports and Protocol as most as possible.**
69
+
70
+
The output will now only show **Pods** to **Services** flows:
Let's start with a simple case where you have a pod not able to reach an endpoint. We are using a simple nodejs sample app deployed in `connectivity-scenario` namespace for the demo.
@@ -135,10 +166,7 @@ At this stage, the collector wait for incoming data. If nothing shows yet, it me
135
166
Once some traffic is captured, the output will look like:
You can cycle to different views using left / right arrow keys and change the displayed enrichment colomns using page up / down ones.
139
-
Also, to adapt to your screen height, you can increase / decrease the number of displayed flows using up / down arrow keys.
140
-
141
-
In this capture, we see that the traffic is blocked by a network policy since it reports the `NetpolNamespace` network event.
169
+
Cycle to the **network events** view. In this capture, we see that the traffic is blocked by a network policy since it reports the `NetpolNamespace` event.
142
170
Edit your network policies and give another try.
143
171
144
172
Behind the scenes in our scenario, we used to have a deny all on the pod label:
0 commit comments