Some checks failed
Build and Deploy to k3s (Production) / build-and-deploy (push) Failing after 3m11s
Fix 502 Bad Gateway error - application was configured to listen on port 80 but Dockerfile specifies port 3000 for Next.js. Changes: - Updated deployment.yml: containerPort 80 → 3000 (both prod & alpha) - Updated service.yml: targetPort 80 → 3000 (both prod & alpha) - Added image registry suffix: hosting-frontend → hosting-frontend-prod/alpha - Added environment variable: NEXT_PUBLIC_API_URL - Added health checks: livenessProbe and readinessProbe - Added protocol: TCP explicit declaration Benefits: - Fixes 502 Bad Gateway errors from Cloudflare - Proper port mapping: Ingress 80 → Service 80 → Pod 3000 - Health checks enable Kubernetes to detect pod issues - Environment variables passed at deployment time Deployment Flow: Client → Cloudflare → Ingress (traefik:80) → Service (port:80) → Pod (3000) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
14 lines
228 B
YAML
14 lines
228 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: hosting-frontend-service
|
|
namespace: hosting-alpha
|
|
spec:
|
|
selector:
|
|
app: hosting-frontend
|
|
ports:
|
|
- port: 80
|
|
targetPort: 3000
|
|
protocol: TCP
|
|
type: ClusterIP
|