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
# Description
Updating the retina shell documentation to be more comprehensive.
Removing the readme from `/shell` in favour of the documentation page to
avoid having to maintain two documents.
## Related Issue
#1835
## Checklist
- [x] I have read the [contributing
documentation](https://retina.sh/docs/Contributing/overview).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [x] I have added tests, if applicable.
---
Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
---------
Signed-off-by: Kamil <[email protected]>
**EXPERIMENTAL: `retina shell` is an experimental feature, so the flags and behavior may change in future versions.**
3
+
>NOTE: `retina shell` is an experimental feature. The flags and behavior may change in future versions.
4
4
5
-
The `retina shell` command allows you to start an interactive shell on a Kubernetes node or pod. This runs a container image with many common networking tools installed (`ping`, `curl`, etc.).
5
+
The `retina shell` command allows you to start an interactive shell on a Kubernetes node or pod for adhoc debugging.
6
6
7
-
## Testing connectivity
7
+
This runs a container image built from the Dockerfile in the `/shell` directory, with many common networking tools installed (`ping`, `curl`, etc.), as well as specialized tools such as [bpftool](#bpftool), [pwru](#pwru) or [Inspektor Gadget](#inspektor-gadget-ig).
8
8
9
-
Start a shell on a node or inside a pod
9
+
Currently the Retina Shell only works in Linux environments. Windows support will be added in the future.
10
10
11
-
```bash
11
+
## Getting Started
12
+
13
+
Start a shell on a node or inside a pod:
14
+
15
+
```shell
12
16
# To start a shell in a node (root network namespace):
For testing, you can override the image used by `retina shell` either with CLI arguments (`--retina-shell-image-repo` and `--retina-shell-image-version`) or environment variables (`RETINA_SHELL_IMAGE_REPO` and `RETINA_SHELL_IMAGE_VERSION`).
30
+
31
+
Run `kubectl retina shell -h` for full documentation and examples.
pkts bytes target prot opt in out source destination
95
+
pkts bytes target prot opt in out source destination
96
+
78
97
root [ / ]# nft list ruleset | head -n 2
79
98
# Warning: table ip filter is managed by iptables-nft, do not touch!
80
99
table ip filter {
81
100
```
82
101
83
-
**If you see the error "Operation not permitted (you must be root)", check that your `kubectl retina shell` command sets `--capabilities NET_RAW,NET_ADMIN`.**
102
+
>NOTE: If you see the error "Operation not permitted (you must be root)", check that your `kubectl retina shell` command sets `--capabilities NET_RAW,NET_ADMIN`.
84
103
85
104
`iptables` in the shell image uses `iptables-nft`, which may or may not match the configuration on the node. For example, Azure Linux 2 maps `iptables` to `iptables-legacy`. To use the exact same `iptables` binary as installed on the node, you will need to `chroot` into the host filesystem (see below).
86
105
87
106
## Accessing the host filesystem
88
107
89
108
On nodes, you can mount the host filesystem to `/host`:
Then `chroot` to the host filesystem and run `systemctl status`:
@@ -144,7 +163,69 @@ root [ / ]# chroot /host systemctl status | head -n 2
144
163
State: running
145
164
```
146
165
147
-
**If `systemctl` shows an error "Failed to connect to bus: No data available", check that the `retina shell` command has `--host-pid` set and that you have chroot'd to /host.**
166
+
>NOTE: If `systemctl` shows an error "Failed to connect to bus: No data available", check that the `retina shell` command has `--host-pid` set and that you have chroot'd to /host.
167
+
168
+
## [pwru](https://github.com/cilium/pwru)
169
+
170
+
eBPF-based tool for tracing network packets in the Linux kernel with advanced filtering capabilities. It allows fine-grained introspection of kernel state to facilitate debugging network connectivity issues.
171
+
172
+
Requires the `NET_ADMIN` and `SYS_ADMIN` capabilities.
173
+
174
+
Capability requirements are based on common eBPF tool practices and not directly from the pwru documentation.
Allows you to list, dump, load BPF programs, etc. Reference utility to quickly inspect and manage BPF objects on your system, to manipulate BPF object files, or to perform various other BPF-related tasks.
190
+
191
+
Requires the `NET_ADMIN` and `SYS_ADMIN` capabilities.
Tools and framework for data collection and system inspection on Kubernetes clusters and Linux hosts using eBPF.
208
+
209
+
To use `ig`, you need to add the `--mount-host-filesystem`, `--apparmor-unconfined` and `--seccomp-unconfined` flags, along with the following capabilities:
0 commit comments