After running openreplay -u, the /v2/api/* endpoints return 404 because the ingress gets reset to default values that point to the wrong backend service.
- The
api-openreplayingress routes toapi-openreplay:8080(Go server) - But the actual API (health, signup, etc.) lives on
chalice-openreplay:8000at/api/* - The rewrite target also needs to be
/api/$1instead of/$1
Run these after every openreplay -u:
# Point ingress to chalice service
kubectl patch ingress -n app api-openreplay --type='json' -p='[
{"op": "replace", "path": "/spec/rules/0/http/paths/0/backend/service/name", "value": "chalice-openreplay"},
{"op": "replace", "path": "/spec/rules/0/http/paths/0/backend/service/port/number", "value": 8000}
]'
# Fix rewrite target
kubectl annotate ingress -n app api-openreplay nginx.ingress.kubernetes.io/rewrite-target='/api/$1' --overwrite# Test health endpoint
curl -s "https://replay.example.com/v2/api/"
# Expected: {}
# Test signup endpoint
curl -s "https://replay.example.com/v2/api/signup"
# Expected: {"data":{"tenants":true,...}}- The health endpoint is at
/api/(root), not/api/health - Chalice is a Python/FastAPI service serving the main API
- The Go
api-openreplayservice serves different functionality