service-manage
$
npx mdskill add kurtosis-tech/kurtosis/service-manageControl Kurtosis enclave services with logs, shells, and lifecycle commands.
- Debug running containers by viewing logs and executing shell commands.
- Requires kurtosis CLI with a running engine and active enclave.
- Executes commands directly within service containers via exec or shell.
- Outputs detailed service status, ports, and container information.
SKILL.md
.github/skills/service-manageView on GitHub ↗
---
name: service-manage
description: Manage services in Kurtosis enclaves. Add, inspect, stop, start, remove, update services. View logs, shell into containers, and execute commands. Use when you need to interact with running services.
compatibility: Requires kurtosis CLI with a running engine and at least one enclave.
metadata:
author: ethpandaops
version: "1.0"
---
# Service Manage
Manage services running inside Kurtosis enclaves.
## List services
```bash
# Services are shown in enclave inspect output
kurtosis enclave inspect <enclave-name>
```
## View logs
```bash
# View logs
kurtosis service logs <enclave-name> <service-name>
# Follow logs in real time
kurtosis service logs <enclave-name> <service-name> -f
# Show all logs (not just recent)
kurtosis service logs <enclave-name> <service-name> -a
```
## Shell and exec
```bash
# Get an interactive shell
kurtosis service shell <enclave-name> <service-name>
# Execute a single command
kurtosis service exec <enclave-name> <service-name> -- ls -la /data
# Execute with pipes (wrap in sh -c)
kurtosis service exec <enclave-name> <service-name> -- sh -c "cat /etc/hosts | grep localhost"
```
## Inspect a service
```bash
kurtosis service inspect <enclave-name> <service-name>
```
Shows detailed info including ports, status, and container ID.
## Stop and start
```bash
# Stop a service (keeps it in the enclave, just stops the container)
kurtosis service stop <enclave-name> <service-name>
# Restart a stopped service
kurtosis service start <enclave-name> <service-name>
```
## Remove a service
```bash
kurtosis service rm <enclave-name> <service-name>
```
## Add a service manually
```bash
kurtosis service add <enclave-name> <service-name> <image>
```
## Update a service
```bash
kurtosis service update <enclave-name> <service-name>
```
## Common patterns
### Verify after operations
Always confirm stop/start/rm succeeded:
```bash
# Check service state changed as expected
kurtosis enclave inspect <enclave-name>
# For start: verify the service responds
kurtosis service exec <enclave-name> <service-name> -- wget -qO- http://localhost:8080/health
```
### Check if a service is healthy
```bash
# HTTP health check
kurtosis service exec <enclave-name> <service-name> -- wget -qO- http://localhost:8080/health
# Check process is running
kurtosis service exec <enclave-name> <service-name> -- ps aux
# Check listening ports
kurtosis service exec <enclave-name> <service-name> -- netstat -tlnp
```
### Debug a crashing service
```bash
# Check recent logs
kurtosis service logs <enclave-name> <service-name>
# Check all logs from the start
kurtosis service logs <enclave-name> <service-name> -a
# Inspect for error status
kurtosis service inspect <enclave-name> <service-name>
```
### Copy data between services
Use file artifacts in Starlark:
```python
# Store files from one service
artifact = plan.store_service_files(service_name="source-svc", src="/data/output", name="shared-data")
# Mount in another service
plan.add_service(name="dest-svc", config=ServiceConfig(
image="my-image",
files={"/input": artifact},
))
```
## Troubleshooting
| Symptom | Cause | Fix |
|---------|-------|-----|
| Service won't start | Port conflict or image issue | Check logs with `kurtosis service logs`, verify image exists |
| Exec command hangs | Container has no shell | Use a base image with shell or `exec -- /bin/sh -c "command"` |
| Logs show no output | Service crashed immediately | Use `kurtosis service logs -a` to see full history |
| Service not listed | Wrong enclave | Run `kurtosis enclave ls` and `kurtosis enclave inspect` to find it |
| Stop has no effect | Service already stopped | Check status with `kurtosis enclave inspect` first |
More from kurtosis-tech/kurtosis
- cli-local-buildBuild and test the Kurtosis CLI from source. Compile the CLI binary locally, run it against Docker or Kubernetes engines, and iterate on CLI changes without creating a release. Use when developing or debugging CLI commands.
- cluster-manageManage 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.
- context-manageManage 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).
- docker-debugDebug Kurtosis running on local Docker. Inspect engine, API container, and service logs. Diagnose container crashes, port conflicts, and networking issues. Use when kurtosis commands fail or services aren't reachable on Docker.
- docker-local-buildBuild and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.
- dumpDump 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.
- enclave-inspectInspect and manage Kurtosis enclaves. List enclaves, view services and ports, examine file artifacts, dump enclave state for debugging, and clean up. Use when you need to understand what's running inside an enclave or export its state.
- engine-manageManage 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.
- files-inspectInspect, download, upload, and debug Kurtosis file artifacts. View artifacts in an enclave, download them locally for inspection, upload local files, and troubleshoot file mounting issues. Use when services can't find expected files or configs are wrong.
- gatewayStart and manage the Kurtosis gateway for Kubernetes. The gateway forwards local ports to the Kurtosis engine and services running in a k8s cluster. Required when using Kurtosis with Kubernetes. Use when kurtosis engine status shows nothing on k8s or services aren't reachable.