Skip to content

Commit c9c1c81

Browse files
committed
Fix tap.md formatting, consolidate usage header, update examples & flags
1 parent 2c6be21 commit c9c1c81

1 file changed

Lines changed: 36 additions & 17 deletions

File tree

  • linkerd.io/content/2.19/reference/cli

linkerd.io/content/2.19/reference/cli/tap.md

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,62 @@ title: "tap"
33
description: "CLI reference for the `linkerd tap` command, including usage and flags."
44
---
55

6-
## `linkerd tap` Command
6+
The `linkerd tap` command allows you to observe live traffic to a
7+
Kubernetes resource in your cluster. It streams real-time request logs
8+
and helps diagnose network behavior for services managed by Linkerd.
79

8-
The `linkerd tap` command allows you to observe live traffic to a Kubernetes resource in your cluster. It streams real-time request logs and helps diagnose network behavior for services managed by Linkerd.
9-
10-
### Usage
10+
## Usage
1111

1212
```bash
13-
linkerd tap [flags] RESOURCE
13+
linkerd viz tap [flags] RESOURCE
1414
```
15-
- **RESOURCE**: The Kubernetes resource you want to observe. This can be a pod, deployment, or service.
15+
- **RESOURCE**: The Kubernetes resource you want to observe. This can be
16+
a pod, deployment, or service.
1617

17-
### Important Note on Skipped Ports
18+
## Important Note on Skipped Ports
1819

1920
If a pod is configured with the annotations:
2021

2122
- `config.linkerd.io/skip-inbound-ports`
2223
- `config.linkerd.io/skip-outbound-ports`
2324

24-
traffic on those ports bypasses the Linkerd proxy. Because `linkerd tap` observes traffic through the proxy, **traffic on skipped ports cannot be tapped**.
25+
Traffic on those ports bypasses the Linkerd proxy. Because
26+
`linkerd tap` observes traffic through the proxy, **traffic on skipped
27+
ports cannot be tapped**.
28+
29+
## Flags
2530

26-
### Flags
2731
| Flag | Description | Default |
2832
|------|-------------|---------|
29-
| `-n, --namespace string` | Namespace of the resource | `default` |
30-
| `--output string` | Output format: `table`, `json`, or `wide` | `table` |
31-
| `--help` | Show help for tap command | n/a |
33+
| `--authority` | Display requests with this :authority | n/a |
34+
| `--max-rps` | Maximum requests per second to tap | n/a |
35+
| `--method` | Display requests with this HTTP method | n/a |
36+
| `-n, --namespace string` | Namespace of the specified resource | `default` |
37+
| `-o, --output string` | Output format. One of: `wide`, `json`, `jsonpath` | `table` |
38+
| `--path` | Display requests with paths that start with this prefix | n/a |
39+
| `--scheme` | Display requests with this scheme | n/a |
40+
| `-l, --selector string` | Selector (label query) to filter on, supports `=`, `==`, `!=` | n/a |
41+
| `--to` | Display requests to this resource | n/a |
42+
| `--to-namespace` | Sets the namespace used to lookup the `--to` resource | n/a |
43+
44+
## Examples
3245

33-
### Examples
3446
1. Tap traffic for a deployment:
47+
3548
```bash
36-
linkerd tap deploy/web -n emojivoto
49+
linkerd viz tap deploy/web -n emojivoto
3750
```
51+
3852
2. Tap traffic for a service:
53+
3954
```bash
40-
linkerd tap svc/web -n emojivoto
55+
linkerd viz tap svc/web -n emojivoto
4156
```
42-
### Description
43-
The `tap` command provides a live feed of proxied requests to a Kubernetes resource. It is commonly used for debugging and observing service-to-service communication within a Linkerd service mesh.
57+
58+
## Description
59+
60+
The `tap` command provides a live feed of proxied requests to a
61+
Kubernetes resource. It is commonly used for debugging and observing
62+
service-to-service communication within a Linkerd service mesh.
4463

4564

0 commit comments

Comments
 (0)