Skip to content

Commit 41e49fe

Browse files
committed
all cli options
1 parent 9d20d25 commit 41e49fe

File tree

14 files changed

+1138
-0
lines changed

14 files changed

+1138
-0
lines changed

skills/clean/SKILL.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: clean
3+
description: Clean up Kurtosis enclaves and artifacts. Remove stopped enclaves, running enclaves with -a flag, and stopped engine containers. Use when you need to free up resources or start fresh.
4+
compatibility: Requires kurtosis CLI with a running engine.
5+
metadata:
6+
author: ethpandaops
7+
version: "1.0"
8+
---
9+
10+
# Clean
11+
12+
Remove Kurtosis enclaves and leftover artifacts.
13+
14+
## Basic clean
15+
16+
Removes only **stopped** enclaves and stopped engine containers:
17+
18+
```bash
19+
kurtosis clean
20+
```
21+
22+
## Clean everything
23+
24+
Removes **all** enclaves (including running ones):
25+
26+
```bash
27+
kurtosis clean -a
28+
```
29+
30+
## Selective removal
31+
32+
To remove a specific enclave without touching others:
33+
34+
```bash
35+
# Stop an enclave
36+
kurtosis enclave stop <enclave-name>
37+
38+
# Remove a specific enclave
39+
kurtosis enclave rm <enclave-name>
40+
```
41+
42+
## When clean hangs
43+
44+
On Kubernetes, `kurtosis clean -a` can hang if the logs collector cleanup tries to create pods on tainted/unhealthy nodes. See the `k8s-clean-cluster` skill for manual cleanup steps.
45+
46+
On Docker, if clean hangs:
47+
48+
```bash
49+
# Kill the hanging process
50+
pkill -f "kurtosis clean"
51+
52+
# Manually remove containers
53+
docker ps -a | grep kurtosis | awk '{print $1}' | xargs -r docker rm -f
54+
55+
# Remove networks
56+
docker network ls | grep kurtosis | awk '{print $1}' | xargs -r docker network rm
57+
58+
# Restart engine
59+
kurtosis engine start
60+
```

skills/cluster-manage/SKILL.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: cluster-manage
3+
description: Manage Kurtosis cluster settings. Switch between Docker and Kubernetes backends, list available clusters, and configure which cluster Kurtosis uses. Use when you need to change where Kurtosis runs enclaves.
4+
compatibility: Requires kurtosis CLI. Kubernetes requires kubectl with cluster access.
5+
metadata:
6+
author: ethpandaops
7+
version: "1.0"
8+
---
9+
10+
# Cluster Manage
11+
12+
Switch between Docker and Kubernetes backends for Kurtosis.
13+
14+
## Check current cluster
15+
16+
```bash
17+
kurtosis cluster get
18+
```
19+
20+
Returns `docker` or `kubernetes`.
21+
22+
## List available clusters
23+
24+
```bash
25+
kurtosis cluster ls
26+
```
27+
28+
## Switch cluster
29+
30+
```bash
31+
# Switch to Docker
32+
kurtosis cluster set docker
33+
34+
# Switch to Kubernetes (uses current kubectl context)
35+
kurtosis cluster set kubernetes
36+
```
37+
38+
After switching, restart the engine:
39+
40+
```bash
41+
kurtosis engine restart
42+
```
43+
44+
## Kubernetes setup
45+
46+
When using Kubernetes:
47+
48+
1. Ensure `kubectl` is configured and can reach your cluster:
49+
```bash
50+
kubectl cluster-info
51+
kubectl get nodes
52+
```
53+
54+
2. Switch Kurtosis to Kubernetes:
55+
```bash
56+
kurtosis cluster set kubernetes
57+
kurtosis engine start
58+
```
59+
60+
3. Start the gateway (required for local CLI to reach the k8s-based engine):
61+
```bash
62+
kurtosis gateway &
63+
```
64+
65+
4. Verify:
66+
```bash
67+
kurtosis engine status
68+
```
69+
70+
## Config file
71+
72+
The cluster setting is stored in the Kurtosis config file:
73+
74+
```bash
75+
kurtosis config path
76+
```
77+
78+
Typically at `~/Library/Application Support/kurtosis/kurtosis-config.yml` on macOS.

skills/context-manage/SKILL.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: context-manage
3+
description: Manage Kurtosis contexts for connecting to different Kurtosis instances. Add, list, switch, and remove contexts. Use when working with multiple Kurtosis environments (local, remote, team shared).
4+
compatibility: Requires kurtosis CLI.
5+
metadata:
6+
author: ethpandaops
7+
version: "1.0"
8+
---
9+
10+
# Context Manage
11+
12+
Manage Kurtosis contexts for connecting to different Kurtosis instances.
13+
14+
## What are contexts?
15+
16+
Contexts define which Kurtosis instance the CLI talks to. The default context is `default` which connects to the local engine (Docker or Kubernetes).
17+
18+
## List contexts
19+
20+
```bash
21+
kurtosis context ls
22+
```
23+
24+
Shows all configured contexts and which one is active.
25+
26+
## Add a context
27+
28+
```bash
29+
kurtosis context add <context-name>
30+
```
31+
32+
## Switch context
33+
34+
```bash
35+
kurtosis context set <context-name>
36+
```
37+
38+
After switching, restart the engine or portal as needed.
39+
40+
## Remove a context
41+
42+
```bash
43+
kurtosis context rm <context-name>
44+
```
45+
46+
## Common workflow
47+
48+
```bash
49+
# Check which context is active
50+
kurtosis context ls
51+
52+
# Switch to a different environment
53+
kurtosis context set staging
54+
55+
# Start portal if using a remote context
56+
kurtosis portal start
57+
58+
# Switch back to local
59+
kurtosis context set default
60+
```

skills/dump/SKILL.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: dump
3+
description: Dump Kurtosis state for debugging and sharing. Export enclave state including service logs, configurations, and file artifacts to a local directory. Use when you need to capture state for offline analysis or to share with others for debugging.
4+
compatibility: Requires kurtosis CLI with a running engine.
5+
metadata:
6+
author: ethpandaops
7+
version: "1.0"
8+
---
9+
10+
# Dump
11+
12+
Export Kurtosis state for debugging and sharing.
13+
14+
## Dump entire Kurtosis state
15+
16+
```bash
17+
kurtosis dump /tmp/kurtosis-dump
18+
```
19+
20+
This exports everything: engine state, all enclaves, services, logs.
21+
22+
## Dump a specific enclave
23+
24+
```bash
25+
kurtosis enclave dump <enclave-name> /tmp/enclave-dump
26+
```
27+
28+
## What gets exported
29+
30+
The dump directory contains:
31+
- **Service logs** — stdout/stderr from each service
32+
- **Service configs** — how each service was configured
33+
- **File artifacts** — all files stored in the enclave
34+
- **Enclave metadata** — creation time, status, parameters
35+
36+
## Directory structure
37+
38+
```
39+
/tmp/enclave-dump/
40+
service-1/
41+
spec.json # Service configuration
42+
output.log # Service logs
43+
service-2/
44+
spec.json
45+
output.log
46+
files-artifacts/
47+
artifact-name/
48+
file1.yaml
49+
file2.json
50+
```
51+
52+
## Common uses
53+
54+
### Share a bug report
55+
56+
```bash
57+
# Dump the problematic enclave
58+
kurtosis enclave dump failing-enclave /tmp/bug-report
59+
60+
# Compress for sharing
61+
tar czf bug-report.tar.gz -C /tmp bug-report
62+
```
63+
64+
### Compare two runs
65+
66+
```bash
67+
kurtosis enclave dump run-1 /tmp/dump-1
68+
kurtosis enclave dump run-2 /tmp/dump-2
69+
diff -r /tmp/dump-1 /tmp/dump-2
70+
```
71+
72+
### Capture state before cleanup
73+
74+
```bash
75+
# Dump everything before cleaning
76+
kurtosis dump /tmp/pre-clean-dump
77+
kurtosis clean -a
78+
```

skills/engine-manage/SKILL.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
name: engine-manage
3+
description: Manage the Kurtosis engine server. Start, stop, restart the engine, check status, and view engine logs. Covers both Docker and Kubernetes engine backends. Use when the engine won't start, needs restarting, or you need to check engine health.
4+
compatibility: Requires kurtosis CLI. Docker or Kubernetes cluster access depending on backend.
5+
metadata:
6+
author: ethpandaops
7+
version: "1.0"
8+
---
9+
10+
# Engine Manage
11+
12+
Manage the Kurtosis engine server lifecycle.
13+
14+
## Status
15+
16+
```bash
17+
kurtosis engine status
18+
```
19+
20+
Shows whether the engine is running and its version.
21+
22+
## Start
23+
24+
```bash
25+
# Start with default settings
26+
kurtosis engine start
27+
28+
# Start with debug images
29+
kurtosis --debug-mode engine start
30+
```
31+
32+
On Kubernetes, the engine runs as a pod in a `kurtosis-engine-*` namespace. You also need to run `kurtosis gateway` to access it from your local machine.
33+
34+
## Stop
35+
36+
```bash
37+
kurtosis engine stop
38+
```
39+
40+
## Restart
41+
42+
```bash
43+
kurtosis engine restart
44+
```
45+
46+
Equivalent to stop + start. Useful after changing cluster settings or upgrading.
47+
48+
## View logs
49+
50+
```bash
51+
kurtosis engine logs
52+
```
53+
54+
Dumps engine server logs. Useful for diagnosing startup failures or API errors.
55+
56+
## Docker vs Kubernetes
57+
58+
```bash
59+
# Check which backend is active
60+
kurtosis cluster get
61+
62+
# Switch to Docker
63+
kurtosis cluster set docker
64+
kurtosis engine restart
65+
66+
# Switch to Kubernetes
67+
kurtosis cluster set kubernetes
68+
kurtosis engine restart
69+
kurtosis gateway # Required for k8s
70+
```
71+
72+
## Engine on Kubernetes
73+
74+
When running on Kubernetes:
75+
76+
```bash
77+
# The engine runs in its own namespace
78+
kubectl get ns | grep kurtosis-engine
79+
80+
# Check engine pod
81+
kubectl get pods -n <engine-namespace>
82+
83+
# View engine logs directly
84+
kubectl logs <engine-pod> -n <engine-namespace>
85+
86+
# Start the gateway (required for local CLI to reach k8s engine)
87+
kurtosis gateway &
88+
```
89+
90+
## Common issues
91+
92+
| Symptom | Fix |
93+
|---------|-----|
94+
| `No Kurtosis engine is running` | Run `kurtosis engine start` |
95+
| Engine starts but `engine status` shows nothing (k8s) | Start the gateway: `kurtosis gateway` |
96+
| Version mismatch warning | `kurtosis engine restart` to match CLI version |
97+
| Engine start hangs (k8s) | Check pods: `kubectl get pods -A \| grep kurtosis` |
98+
| Old engine blocking new start | `kurtosis engine stop` then clean namespaces |

0 commit comments

Comments
 (0)