Skip to content

Add frontend Kubernetes deployment with proper API proxy configuration#8

Merged
kenahrens merged 2 commits intomasterfrom
add/frontend-k8s-deployment
Jul 22, 2025
Merged

Add frontend Kubernetes deployment with proper API proxy configuration#8
kenahrens merged 2 commits intomasterfrom
add/frontend-k8s-deployment

Conversation

@kenahrens
Copy link
Copy Markdown
Member

Summary

  • Adds complete frontend deployment to Kubernetes cluster
  • Implements Next.js server-side API proxy for backend communication
  • Fixes frontend Dockerfile to handle build-time environment variables properly
  • Updates CI/CD workflow to build frontend with correct API configuration
  • Removes hardcoded localhost URLs and uses proper service discovery

Changes Made

  • Frontend Deployment: Added Kubernetes deployment and service manifests for frontend
  • API Proxy: Implemented Next.js rewrites in next.config.ts to proxy API calls to backend services
  • Environment Handling: Updated Dockerfile and CI/CD to properly handle API URLs during build
  • Service Communication: Frontend now communicates with api-gateway service instead of localhost

Test Plan

  • Deploy frontend to Kubernetes cluster
  • Verify frontend can reach backend services through proxy
  • Test user registration and login flows
  • Confirm API calls are properly routed through api-gateway

🤖 Generated with Claude Code

kenahrens and others added 2 commits July 21, 2025 20:14
- Added frontend-deployment.yaml and frontend-service.yaml
- Created frontend-config.yaml ConfigMap for environment variables
- Updated kustomization.yaml to include frontend resources
- Fixed frontend Dockerfile to accept NEXT_PUBLIC_API_URL at build time
- Updated CI/CD workflow to pass correct API URL during frontend build
- Updated Makefile to handle frontend images in update-images and restore-local-images

Fixes: Frontend calling localhost:8080 instead of actual API Gateway

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ndling

- Modified frontend Dockerfile to use build-time environment variables
- Updated next.config.ts to implement API proxy rewrites for backend communication
- Changed API client to use relative URLs for proper proxy routing
- Updated CI/CD workflow to pass API URL during frontend build
- Removed unused frontend-config.yaml configmap
- Updated frontend deployment to use environment variables properly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kenahrens kenahrens merged commit 1969122 into master Jul 22, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant