Skip to main content
This guide provides the standard ingress configuration pattern for all FlowX.AI services that expose REST APIs or event streams to external clients.

Overview

FlowX.AI services use Kubernetes ingress with NGINX to expose APIs to the FlowX Designer and other external consumers. All services follow a consistent pattern with specific CORS headers required for multi-tenant workspace identification.

Standard ingress pattern

Common template

Most FlowX.AI services use this standard ingress configuration:

Service-specific values

Replace the placeholders with service-specific values from this table:

Standard annotations explained

Required annotations

Workspace identification header

The Fx-Workspace-Id header is required in the cors-allow-headers annotation for all services except Events Gateway.
The Fx-Workspace-Id header enables multi-tenant workspace identification. Include it in the CORS allowed headers:

Events Gateway exception

The Events Gateway service handles Server-Sent Events (SSE) and uses a simplified ingress configuration without the cors-allow-headers annotation:
Events Gateway does not require the Fx-Workspace-Id header in its ingress configuration because it handles real-time SSE connections with different security requirements.

Environment-specific customization

Required changes per environment

Update these values for your specific environment:
  1. CORS Origins - Replace with your actual domains:
  2. Host - Set to your ingress hostname:
  3. TLS Configuration - Add TLS section if using HTTPS:

Development vs Production

Development:
Production:

Complete example

Here’s a complete, production-ready ingress configuration for the Admin service:

Troubleshooting

CORS errors

Problem: Browser shows CORS policy errors Solution: Verify that:
  1. Fx-Workspace-Id is included in cors-allow-headers
  2. Your origin is listed in cors-allow-origin
  3. enable-cors is set to true

413 Request Entity Too Large

Problem: Large file uploads fail Solution: Increase buffer sizes:

502 Bad Gateway

Problem: Service unreachable through ingress Solution: Verify:
  1. Service name matches the backend service
  2. Port name is correct (typically http)
  3. Service is running and healthy

Path routing issues

Problem: Requests return 404 Solution: Check:
  1. Path pattern matches your URL structure
  2. Rewrite target correctly transforms the path
  3. Service expects the rewritten path format

Best practices

Security

  • Use HTTPS in production
  • Restrict CORS origins to known domains
  • Never use wildcards in production CORS origins
  • Keep buffer sizes reasonable (25M is sufficient for most use cases)

Performance

  • Use appropriate buffer sizes for your workload
  • Monitor ingress metrics
  • Configure timeouts for long-running requests
  • Consider connection limits for SSE endpoints

Maintainability

  • Use consistent naming conventions
  • Document any deviations from standard pattern
  • Keep annotations organized alphabetically
  • Use ConfigMaps for shared values

Reliability

  • Always include health check paths
  • Configure proper timeouts
  • Use multiple replicas for high availability
  • Monitor ingress logs for errors

Additional resources

NGINX Ingress Controller Documentation

Kubernetes Ingress Documentation

Last modified on May 12, 2026