Skip to content

Usage

Prerequisites

  • Docker (for image builds).
  • Kind cluster named sportsstack with the nginx ingress controller and metrics-server installed.
  • .env at the repo root with database credentials and THEODDSAPI_KEY for 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)

  1. Build images: just build-rotoreader / just build-oddstracker / just build-api-gateway / just build-go-sportsagent.
  2. Load them into the Kind cluster: just kind-load-rotoreader / just kind-load-oddstracker / just kind-load-api-gateway / just kind-load-go-sportsagent.
  3. Refresh secrets from .env: just k8s-create-secret.
  4. Apply manifests: just k8s-apply.
  5. Monitor rollouts: just k8s-rollouts.
  1. Build images: just build-rotoreader / just build-oddstracker / just build-api-gateway / just build-go-sportsagent.
  2. Load them into the Kind cluster: just kind-load-rotoreader / just kind-load-oddstracker / just kind-load-api-gateway / just kind-load-go-sportsagent.
  3. Refresh secrets from .env: just k8s-create-secret.
  4. Install/upgrade charts:
  5. Database: just helm-db-install (in-cluster) or just helm-db-install-external host=mydb.example.com (external)
  6. Services: just helm-oddstracker-install / just helm-rotoreader-install / just helm-api-gateway-install / just helm-go-sportsagent-install
  7. Apply remaining manifests (ingress): kubectl apply -f k8s/ingress.yaml.
  8. 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.