1) Start Minikube & namespace

minikube start --cpus=4 --memory=6g
kubectl create ns portal

2) Secrets & config

We pass a single DATABASE_URL for the backend (adjust if needed):

kubectl -n portal create secret generic portal-secrets \
  --from-literal=DATABASE_URL='postgresql+psycopg2://portal:portal@postgres:5432/portal' \
  --from-literal=OPENAI_API_KEY=''  # leave empty if not used

3) Apply Manifests
Place the files below under k8s/local/ and run:

kubectl -n portal apply -f k8s/local/postgres.yaml
kubectl -n portal apply -f k8s/local/api.yaml

4) Build & load the API image into Minikube
From repo root:

# Option A: Build directly into Minikube’s Docker
eval "$(minikube -p minikube docker-env)"
docker build -t portal-api:local .

# Option B: minikube image build
# minikube image build -t portal-api:local .

5) Rollout & access

kubectl -n portal rollout status deploy/api
kubectl -n portal port-forward svc/api 8080:8080
# Open http://localhost:8080/healthz and http://localhost:8080/docs

Optional: If you need Chroma or other services, we can add a chroma.yaml later. For now, API + Postgres is enough to run and test the endpoints.


Comments

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です