Usage
Prerequisites
- Docker (for image builds).
- Kind cluster named
sportsstackwith the nginx ingress controller and metrics-server installed. .envat the repo root with database credentials andTHEODDSAPI_KEYfor oddstracker.
Daily Workflow
Follow the sequence below to rebuild and redeploy as changes are made. The justfile is the central entry point for repeated operations.
With kubectl manifests (traditional)
- Build images:
just build-rotoreader/just build-oddstracker/just build-api-gateway/just build-go-sportsagent. - Load them into the Kind cluster:
just kind-load-rotoreader/just kind-load-oddstracker/just kind-load-api-gateway/just kind-load-go-sportsagent. - Refresh secrets from
.env:just k8s-create-secret. - Apply manifests:
just k8s-apply. - Monitor rollouts:
just k8s-rollouts.
With Helm charts (recommended)
- Build images:
just build-rotoreader/just build-oddstracker/just build-api-gateway/just build-go-sportsagent. - Load them into the Kind cluster:
just kind-load-rotoreader/just kind-load-oddstracker/just kind-load-api-gateway/just kind-load-go-sportsagent. - Refresh secrets from
.env:just k8s-create-secret. - Install/upgrade charts:
- Database:
just helm-db-install(in-cluster) orjust helm-db-install-external host=mydb.example.com(external) - Services:
just helm-oddstracker-install/just helm-rotoreader-install/just helm-api-gateway-install/just helm-go-sportsagent-install - Apply remaining manifests (ingress):
kubectl apply -f k8s/ingress.yaml. - Monitor rollouts:
just k8s-rollouts.
Useful Commands
- Restart deployments:
just restart-rotoreader,just restart-oddstracker,just restart-api-gateway,just restart-go-sportsagent. - Tail logs:
just logs-rotoreader,just logs-oddstracker,just logs-api-gateway,just logs-go-sportsagent,just logs-rotoreader-init,just logs-oddstracker-init. - Inspect cluster state:
just describe-rotoreader,just describe-oddstracker,just describe-go-sportsagent,just events. - Port-forward for local access:
just pf-api-gateway,just pf-rotoreader,just pf-oddstracker,just pf-go-sportsagent,just pf-ingress. - Database shell:
just db-shell.