Quick Debug Commands
The project provides several debugging commands in the devenv shell:Kubernetes Debugging
Using debug-k8s
Thedebug-k8s command provides a quick overview of your cluster state:
- Pod status across all namespaces
- Recent Kubernetes events (last 10)
Manual Kubernetes Debugging
View pod logs
View pod logs
Describe pod status
Describe pod status
Execute commands in pod
Execute commands in pod
Check service endpoints
Check service endpoints
Port forward for testing
Port forward for testing
gRPC Debugging
Using debug-grpc
Thedebug-grpc command tests gRPC connectivity:
Manual grpcurl Usage
Common grpcurl Examples
Service-Specific Debugging
Go Services
View service logs
View service logs
Check service health
Check service health
Verify environment variables
Verify environment variables
Test with delve debugger
Test with delve debugger
Add to docker-compose.yml:Connect with your IDE or:
Node.js Services
View service logs
View service logs
Check service health
Check service health
Test authentication flow
Test authentication flow
Enable Node.js inspector
Enable Node.js inspector
Add to docker-compose.yml:Connect with Chrome DevTools:
Docker Compose Debugging
Tilt Debugging
Tilt Dashboard
Access the Tilt UI at http://localhost:10350 The dashboard shows:- Build status for each service
- Pod status and logs
- Resource dependencies
- Error messages and warnings
Tilt Commands
Common Issues and Solutions
Pod stuck in CrashLoopBackOff
Pod stuck in CrashLoopBackOff
Check logs:Common causes:
- Missing environment variables
- Port already in use
- Failed health check
- Panic in Go code
grpcurl connection refused
grpcurl connection refused
Symptoms:Check service is running:Verify port:
Service can't reach other services
Service can't reach other services
Check network:Verify service endpoints:
gen-manifests fails
gen-manifests fails
Error: file not foundSolution: Git add new files (Nix only sees tracked files)Error: chartHash mismatchSolution:
Traefik routing not working
Traefik routing not working
Check Traefik dashboard:Test without Traefik:
- Docker Compose: http://localhost:8080 (if enabled)
- Kubernetes:
kubectl -n microservices port-forward svc/traefik 8080:80
Monitoring and Observability
Accessing Monitoring Tools
When running withfull-bootstrap:
Grafana
URL: http://localhost:30300
Credentials: admin / admin
View metrics, logs (Loki), and traces (Tempo)
Credentials: admin / admin
View metrics, logs (Loki), and traces (Tempo)
Prometheus
URL: http://localhost:30090
Query raw metrics and check targets
Query raw metrics and check targets
Hubble UI
URL: http://localhost:31235
Visualize network flows between services
Visualize network flows between services
Tilt Dashboard
URL: http://localhost:10350
Build status, logs, and resource management
Build status, logs, and resource management
See Also
- Testing Guide - Test your services before debugging
- Adding a Go Service - Understand Go service structure
- Adding a Node.js Service - Understand Node.js service structure