1. Incident Overview
A migration from one ingress or API gateway to another does not end when the new gateway is deployed and its routes are configured.
Every upstream system that forwards traffic to the application must also be updated.
This became apparent during the Internal Portal migration from NGINX to Kong.
After the migration, users accessing Internal Portal through its existing Edge Proxy URL encountered:
404 Not FoundThe initial suspicion naturally fell on the newly introduced Kong configuration. However, direct testing of the new Kong endpoint showed that it was reachable.
The investigation eventually identified a different problem: Edge Proxy was still forwarding requests to the old NGINX endpoint rather than the new Kong endpoint.
The Kong migration itself was not the component that needed correction. The missing piece was the upstream reverse proxy mapping.
Incident metadata
| Attribute | Details |
|---|---|
| Application | Internal Portal |
| Environment | PROD |
| Region | eu-central-1 |
| Namespace | portal-app |
| Migration | NGINX to Kong |
| User-facing symptom | HTTP 404 |
| Existing access path | Edge Proxy |
| New gateway | Kong |
| Confirmed cause | Edge Proxy mapped to the old NGINX URL |
2. Understanding the Architecture
Before investigating the error, it is important to understand the request path.
Internal Portal was accessed through an established Edge Proxy URL:
https://portal.example.com/app/As part of the migration, the application was moved behind a new Kong endpoint:
https://portal-app.prod.gateway.example.com/app/The application endpoint had changed, but the existing user-facing URL was expected to continue working.
That meant Edge Proxy needed to forward incoming requests to the new Kong endpoint.
The architecture should have looked like this:
Diagram source
flowchart TD
A["User / Browser"] --> B["Edge Proxy URL"]
B --> C["Upstream Reverse Proxy"]
C --> D["New Kong Endpoint"]
D --> E["Kong Route"]
E --> F["Internal Portal Kubernetes Service"]
F --> G["Internal Portal Pod"]
classDef user fill:#dbeafe,stroke:#2563eb,color:#111827
classDef proxy fill:#fef3c7,stroke:#d97706,color:#111827
classDef backend fill:#dcfce7,stroke:#16a34a,color:#111827
class A,B user
class C,D,E proxy
class F,G backend- Internal Portal: stale Edge Proxy mapping after NGINX → Kong migration
- Request routing investigation — observed responses and configuration boundary
- User / Browser Edge Proxy URL /app/
- Edge Proxy Reverse proxy / URL mapping
- Old NGINX endpoint Stale destination
- New Kong endpoint Internal Portal route
- Observed mapping
- Expected target
- Edge Proxy URL returned 302 (authentication redirect)
- Direct Kong request returned 403 without authentication
- Evidence
- • Edge Proxy path: HTTP 302 to corporate SSO • Direct Kong path: HTTP/2 403 unauthenticated • Kong-side route/config verified
- RCA conclusion
- Edge Proxy remained mapped to the old NGINX URL instead of the new Kong endpoint. Update the upstream mapping and validate auth.
- A 403 from the direct endpoint is not proof of a broken route when authentication is required.
The problem was that the actual Edge Proxy mapping had not followed the migration.
3. Initial Symptoms
The first indication was straightforward:
https://portal.example.com/app/returned:
404 Not FoundAt this stage, several components could potentially have been responsible:
- Edge Proxy reverse proxy configuration.
- Kong route configuration.
- Kubernetes Ingress or gateway routing.
- Kubernetes Service configuration.
- Application context path.
- Authentication or authorization handling.
Rather than immediately modifying Kong, the investigation separated the two access paths:
- Access through the existing Edge Proxy URL.
- Access directly through the new Kong endpoint.
This distinction was important because it allowed the gateway to be tested independently of the upstream reverse proxy.
4. Investigation: Testing Both Endpoints
Step 1: Test the existing Edge Proxy URL
The first test was against the URL users normally accessed.
curl -I -v \
https://portal.example.com/app/The response showed:
HTTP/1.1 302 FoundThe response redirected the request to the corporate SSO endpoint.
A redirect is not the same as a successful application response. It indicates that the request was redirected to another URL.
This observation provided useful information about the authentication flow, but it did not prove that Edge Proxy was forwarding traffic to the correct application endpoint.
Step 2: Test the new Kong endpoint directly
The next step was to bypass Edge Proxy and test the new Kong URL.
curl -I -v \
https://portal-app.prod.gateway.example.com/app/The response was:
HTTP/2 403At first glance, a 403 may look like another application failure.
However, this response was returned by a direct request without the required authentication context.
A 403 response means the server understood the request but refused to authorize it.
The important distinction was that the new Kong endpoint was reachable and responding.
It did not establish that an unauthenticated request should be allowed to access the application.
Step 3: Interpret the responses correctly
| Request path | Observed response | Interpretation |
|---|---|---|
| Edge Proxy URL | HTTP 302 | Redirect to corporate SSO |
| Direct Kong URL | HTTP/2 403 | Endpoint responding; unauthenticated access denied |
| Expected application behavior | Authenticated application response | Requires validation with the correct authentication context |
This is a useful troubleshooting lesson:
HTTP status codes must be interpreted in the context of the request path and authentication state.
A 403 from an unauthenticated direct request does not automatically indicate a broken Kong route.
5. Validate Kong and Kubernetes Configuration
Since the direct Kong endpoint was reachable, the next step was to verify that the Kubernetes-side configuration matched the migration design.
The investigation checked the relevant resources in the portal-app namespace.
Check Ingress resources
kubectl get ingress -n portal-appInspect the relevant resource:
kubectl get ingress <ingress-name> \
-n portal-app -o yamlCheck ConfigMaps
kubectl get configmap -n portal-appInspect the relevant configuration:
kubectl get configmap <configmap-name> \
-n portal-app -o yamlCheck Services
kubectl get svc -n portal-appInspect the application Service:
kubectl get svc <service-name> \
-n portal-app -o yamlThe purpose of these checks was to verify:
- The expected Kong routing configuration existed.
- The application path was configured.
- The Service referenced the correct application backend.
- The Kubernetes-side configuration reflected the new endpoint.
The Kong-side configuration was verified and found to be correctly configured for the new endpoint.
This reduced the likelihood that the 404 originated from a missing or incorrectly configured Kong route.
6. The Missing Link: Edge Proxy Still Pointed to NGINX
Once the new Kong endpoint and its Kubernetes configuration had been verified, attention shifted to the component sitting in front of it.
Edge Proxy was responsible for preserving the existing user-facing URL while forwarding traffic to the application.
The migration had changed the backend gateway, but the Edge Proxy mapping still referenced the previous NGINX endpoint.
Conceptually, the stale mapping looked like this:
Edge Proxy
|
v
Old NGINX endpoint
|
v
Previous Internal Portal routing pathThe expected mapping was:
Edge Proxy
|
v
New Kong endpoint
|
v
Internal Portal routeThis explained why validating Kong directly was not enough.
The direct endpoint and the user-facing endpoint were two different request paths, with Edge Proxy acting as an additional routing dependency.
Actual versus expected request path
Diagram source
flowchart TD
A["User accesses Edge Proxy URL"] --> B["Upstream Reverse Proxy"]
B --> C["Old NGINX endpoint"]
C --> D["Stale routing destination"]
D --> E["404 Not Found"]
B -. "Expected mapping after migration" .-> F["New Kong endpoint"]
F --> G["Kong route"]
G --> H["Internal Portal Service"]
H --> I["Internal Portal application"]
classDef error fill:#fee2e2,stroke:#dc2626,color:#111827
classDef expected fill:#dcfce7,stroke:#16a34a,color:#111827
class C,D,E error
class F,G,H,I expectedThe issue was not that Kong could not route to Internal Portal. It was that the established upstream entry point had not been updated to use Kong.
7. Root Cause Analysis
Root cause
Edge Proxy retained the old NGINX destination after the Internal Portal migration to Kong.
As a result, requests made through the existing Edge Proxy URL were not routed to the new Kong endpoint.
The new Kong endpoint was independently reachable, and its Kubernetes-side configuration was verified.
Contributing factor
The migration validation focused on the new Kong endpoint and its internal routing configuration.
However, the upstream reverse proxy mapping was also part of the end-to-end application access path.
A gateway migration is incomplete until every upstream dependency is updated or intentionally redirected.
Why the initial symptoms were misleading
There were two different HTTP responses during the investigation:
- The Edge Proxy URL returned a 302 authentication redirect.
- The direct Kong endpoint returned HTTP/2 403 without authentication.
Neither response alone established the routing problem.
The decisive finding came from validating the Edge Proxy destination mapping against the new Kong endpoint.
8. Remediation
The required correction was to update the Edge Proxy reverse proxy mapping so that the existing application URL forwarded requests to the new Kong endpoint.
Expected destination:
https://portal-app.prod.gateway.example.com/app/The remediation should include:
- Update the Edge Proxy upstream destination.
- Remove the stale NGINX endpoint reference from the active mapping.
- Validate the configured path and trailing-slash behavior.
- Verify the authentication flow through the existing Edge Proxy URL.
- Test the application using an authenticated session.
- Confirm that the request reaches the expected Kong route and backend Service.
The existing Edge Proxy URL should remain the user-facing entry point if that is the intended application architecture.
The goal is to change the upstream destination without unnecessarily changing the URL used by end users.
9. Post-Fix Validation Checklist
A successful configuration update should be validated end to end.
| Validation | Expected outcome |
|---|---|
| Edge Proxy URL | Reaches the intended authentication flow |
| Authentication | corporate SSO completes successfully |
| Edge Proxy upstream | Points to the new Kong endpoint |
| Kong route | Matches /app/ |
| Kubernetes Service | Routes to the expected backend |
| Application | Internal Portal loads successfully |
| Old NGINX mapping | No longer used by the active Edge Proxy route |
| Logs | Request can be correlated across proxy and gateway layers |
A direct unauthenticated curl request returning 403 should not be treated as a failed validation if the application intentionally requires authentication.
Use an authorized test session or the approved authentication mechanism to validate the complete user journey.
10. Lessons for Platform Engineering and SRE
1. Gateway migrations involve more than the gateway
When replacing NGINX with Kong, upstream reverse proxies, DNS records, application routing, authentication integrations, and monitoring must all be considered.
2. Test the complete request path
Testing the new gateway directly is useful, but it does not validate the existing user-facing URL.
Both paths must be checked.
3. Understand HTTP status codes before troubleshooting
A 302 redirect, 403 authorization response, and 404 routing response represent different behaviors.
Treating every non-200 response as the same failure can send an investigation in the wrong direction.
4. Validate external dependencies during migration
The application may be healthy, the new gateway may be correctly configured, and Kubernetes Services may be working — yet users can still experience an outage because an upstream system has stale configuration.
5. Keep migration checklists end to end
A production migration checklist should explicitly include:
- New gateway route validation.
- Upstream reverse proxy updates.
- Authentication and authorization validation.
- Existing URL compatibility.
- Application backend connectivity.
- Rollback destination.
- End-to-end smoke testing.
11. Final Takeaway
This incident demonstrates why troubleshooting should follow the actual request path rather than focusing only on the component that was recently changed.
Kong was deployed and its routing configuration was verified. The application endpoint was reachable.
The failure occurred because Edge Proxy continued to use the old NGINX destination.
The lesson: a gateway migration is only complete when every upstream system knows where the new gateway is.
