Skip to content

Commit a22f3f9

Browse files
committed
use present
1 parent 82e88f8 commit a22f3f9

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ oc login <CLUSTER_API_URL> --username <CLUSTER_ADMIN> --password <PASSWORD>
1717

1818
To observe what the CLI deploys on your cluster, you can run the `oc events -n netobserv-cli -w` command to watch all the events happening in the `netobserv-cli` namespace.
1919

20-
The result will look like:
20+
The result look like:
2121
```sh
2222
LAST SEEN TYPE REASON OBJECT MESSAGE
2323
0s Normal SuccessfulCreate DaemonSet/netobserv-cli Created pod: netobserv-cli-t2vlr
@@ -41,9 +41,9 @@ LAST SEEN TYPE REASON OBJECT MESSAGE
4141
```
4242

4343
## 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.
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 automatically add `SrcSubnetLabel` and `DstSubnetLabel` to your flows.
4545

46-
You will see subnets being configured during the creation of the agents:
46+
You can see subnets being configured during the creation of the agents:
4747
```sh
4848
creating flow-capture agents:
4949
opt: get_subnets, value: true
@@ -67,7 +67,7 @@ oc netobserv flows --get-subnets --regexes=SrcSubnetLabel~Pods,DstSubnetLabel~Se
6767

6868
**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.**
6969

70-
The output will now only show **Pods** to **Services** flows:
70+
The output is now only showing **Pods** to **Services** flows:
7171
![pods subnets]({page.image('cli/pods-subnets.png')})
7272

7373

@@ -88,7 +88,7 @@ Since we don't know what we are looking for yet, we should enable all the featur
8888
--enable_all
8989
```
9090

91-
By clicking on the pod name, we can see that our current pod IP is `10.129.0.48`. To capture all the traffic going in and out of this pod, we will use the filter:
91+
By clicking on the pod name, we can see that our current pod IP is `10.129.0.48`. To capture all the traffic going in and out of this pod, we use the filter:
9292
```sh
9393
--peer_ip=10.129.0.48
9494
```
@@ -105,12 +105,12 @@ Finally, you can add a node selector label on top:
105105

106106
**WARNING: Running the capture without filtering is also an option, but it is not recommended as it collects all the flows of the cluster. Depending of the size of your cluster, this could be a lot and make the collector pod crash.**
107107

108-
All together, the command to run flow capture with all the features on our pod IP will be:
108+
All together, the command to run flow capture with all the features on our pod IP is:
109109
```sh
110110
oc netobserv flows --enable_all --peer_ip=10.131.0.19
111111
```
112112

113-
The script will connect to your cluster and start deploying eBPF agents and collector pod:
113+
The script connects to your cluster and start deploying eBPF agents and collector pod:
114114
```sh
115115
Checking dependencies...
116116
'yq' is up to date (version v4.43.1).
@@ -142,7 +142,7 @@ pod/collector created
142142
pod/collector condition met
143143
```
144144

145-
Once that done, it will connect to the collector and display its output:
145+
Once that done, it connects to the collector and display its output:
146146
```sh
147147
------------------------------------------------------------------------
148148
_ _ _ _ ___ _ ___
@@ -163,7 +163,7 @@ INFO[0000] flows table created
163163
164164
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.
165165
166-
Once some traffic is captured, the output will look like:
166+
Once some traffic is captured, the output look like:
167167
![cli network events]({page.image('cli/connectivity-scenario-cli-events.png')})
168168
169169
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.
@@ -188,7 +188,7 @@ spec:
188188
Once you updated your policies, you can give another try to your route until you fix the issue:
189189
![cli traffic]({page.image('cli/connectivity-scenario-cli-traffic.png')})
190190
191-
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.
191+
The network event disappear and your route should open correctly now. On top of that, you can ensure that the Round Trip Time is correct.
192192
If you are still experienting issues with the route, you may update / get rid of the filter(s) and play with live filtering.
193193
194194
- While running a capture, you can place **additionnal live filters** to the view by simply typing keywords on your keyboard such as `nodejs`:
@@ -204,16 +204,16 @@ Once you updated your policies, you can give another try to your route until you
204204
Those `NxDomain` errors could be from a misconfiguration in your app deployment trying to reach the wrong domain.
205205
206206
- To check which network is involved, you can switch to **Network Name** enrichment and **UDN** display.
207-
This will show you which network name, interfaces, direction and User Defined Network name involved.
207+
This is showing you which network name, interfaces, direction and User Defined Network name involved.
208208
![cli network]({page.image('cli/connectivity-scenario-cli-network.png')})
209209
210-
Once you are done, simply press `CTRL + C` to exit. Your capture will be copied to your local machine for post mortem analysis.
210+
Once you are done, simply press `CTRL + C` to exit. Your capture is copied to your local machine for post mortem analysis.
211211
212212
That's the end of the first scenario about connectivity checks !
213213

214214
## User Defined Network (Tech Preview)
215215

216-
As tech preview, you can enrich flows to get User Defined Network (UDNs) information. To do so, you will need to use the `--enable_udn_mapping` option.
216+
As tech preview, you can enrich flows to get User Defined Network (UDNs) information. To do so, you can use the `--enable_udn_mapping` option.
217217

218218
To configure your UDNs, [refer to the official documentation](https://docs.openshift.com/container-platform/4.17/networking/multiple_networks/primary_networks/about-user-defined-networks.html).
219219

@@ -265,14 +265,14 @@ metadata:
265265
```
266266

267267
Note that `eth0` is the default pod network and `ovn-udn1`is the User Defined Network. We are going to filter on its IP: `10.0.0.4`.
268-
As this IP is not unique across the cluster, we can add a filter on the port `8080` which will be used in this example and the node annotation `kubernetes.io/hostname=ci-ln-cfqkhfb-72292-6l8l5-worker-c-lrr4q` matching the node running this pod.
268+
As this IP is not unique across the cluster, we can add a filter on the port `8080` which is used in this example and the node annotation `kubernetes.io/hostname=ci-ln-cfqkhfb-72292-6l8l5-worker-c-lrr4q` matching the node running this pod.
269269

270270
All together, the command is as follows:
271271
```sh
272272
oc netobserv flows --enable_udn_mapping --peer_ip=10.0.0.4 --port=8080 --node-selector=kubernetes.io/hostname:ci-ln-cfqkhfb-72292-6l8l5-worker-c-lrr4q
273273
```
274274

275-
Once you run the command, it will wait for the flows to come. In this scenario, we simply run a curl between two pods under the same UDN.
275+
Once you run the command, it waits for the flows to come. In this scenario, we simply run a curl between two pods under the same UDN.
276276
You can cycle to **UDN mapping** display once you get your flows to see which UDN is involved.
277277

278278
![udns]({page.image('cli/udns.png')})
@@ -292,7 +292,7 @@ oc netobserv packets --protocol=TCP --port=80
292292

293293
Similarly to the previous scenario, the script connects to your cluster and starts deploying the eBPF agents and collector pod but capturing full packet content this time.
294294

295-
Once first packet is captured, you will see a table with the amount of packets and bytes:
295+
Once first packet is captured, you see a table with the amount of packets and bytes:
296296

297297
![cli packets enriched]({page.image('cli/packet-capture-scenario-table-enriched.png')})
298298

0 commit comments

Comments
 (0)