Context
The dev mode provides a local Docker Compose stack for testing and learning k8scope without a Kubernetes cluster. This lowers the barrier of entry dramatically.
Requirements
Docker Compose stack
Embed a `docker-compose.yaml` in `embed/compose/`:
- Prometheus — Single instance, scraping itself and the other containers
- Grafana — Pre-configured with datasources and dashboards
- Loki — Single instance for log aggregation
- No Alertmanager, no OTel Collector (keep it minimal)
- Ephemeral storage (no volumes)
CLI integration
```bash
Start the local stack
k8scope install --mode dev
Behind the scenes:
1. Extract docker-compose.yaml to a temp directory
2. Run docker compose up -d
3. Print access URLs
Stop and remove
k8scope uninstall --mode dev
```
Detection
- `k8scope install --mode dev` should detect if Docker is available
- If no Docker, print error with installation instructions
- If no Kubernetes and no `--mode dev`, suggest dev mode
Output
```
Starting k8scope dev stack with Docker Compose...
Grafana: http://localhost:3000 (admin/admin)
Prometheus: http://localhost:9090
Loki: http://localhost:3100
Stack is ready. Use 'k8scope uninstall --mode dev' to stop.
```
Acceptance criteria
Context
The dev mode provides a local Docker Compose stack for testing and learning k8scope without a Kubernetes cluster. This lowers the barrier of entry dramatically.
Requirements
Docker Compose stack
Embed a `docker-compose.yaml` in `embed/compose/`:
CLI integration
```bash
Start the local stack
k8scope install --mode dev
Behind the scenes:
1. Extract docker-compose.yaml to a temp directory
2. Run docker compose up -d
3. Print access URLs
Stop and remove
k8scope uninstall --mode dev
```
Detection
Output
```
Starting k8scope dev stack with Docker Compose...
Grafana: http://localhost:3000 (admin/admin)
Prometheus: http://localhost:9090
Loki: http://localhost:3100
Stack is ready. Use 'k8scope uninstall --mode dev' to stop.
```
Acceptance criteria