knative-extensions / knative-extensions/net-gateway-api

Envoy Gateway returns 503

Open
#961 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
50
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Envoy Gateway returns 503 for Knative ExternalName backend (no endpoints) when using Gateway API

Summary

When using **Knative with **Gateway API (via net-gateway + **Envoy Gateway), Knative generates HTTPRoute resources that reference a Service of type ExternalName.

However, Envoy Gateway requires backends to have resolvable endpoints, and ExternalName Services do not create endpoints. This results in:

  • 503 Service Unavailable.
  • EndpointsNotFound condition on the HTTPRoute
  • Envoy is unable to route traffic

Expected Behavior

Knative-generated Gateway API resources should be fully compatible with Envoy Gateway and result in:

  • Valid upstream clusters
  • Successful routing to Knative services
  • No dependency on endpoint-less Service types for HTTPRoute backends

Actual Behavior

The generated HTTPRoute includes:

backendRefs:
  - name: website
    port: 80

Where the referenced Service is:

kind: Service
type: ExternalName
externalName: knative-internal.envoy-gateway-system.svc.cluster.local

Result:

  • No Endpoints object exists

  • Envoy Gateway reports:

    Failed to find endpoints: no ready endpoints for the related Service
    
  • Requests return:

    503 Service Unavailable
    

Observations
  • The HTTPRoute is Accepted and ResolvedRefs=True
  • But BackendsAvailable=False due to missing endpoints
  • Direct requests to the internal gateway service work
  • Routing through this ExternalName-based Service fails

Reproduction Steps
  1. Install Knative Serving with Gateway API (net-gateway + Envoy Gateway)
  2. Create a Knative Service
  3. Create a DomainMapping (or similar) that generates an HTTPRoute
  4. Observe that the generated backend Service is of type ExternalName
  5. Send request via external gateway

Result

Envoy Gateway fails to route due to missing endpoints for ExternalName Service.


Relevant Logs

Envoy access log:

{
  "response_code": 503,
  "response_code_details": "via_upstream",
  "upstream_cluster": null,
  "upstream_host": null
}

HTTPRoute status:

BackendsAvailable: False
Reason: EndpointsNotFound

Question

Is the use of ExternalName Services for HTTPRoute backends expected with Gateway API?

If so:

  • How should Envoy Gateway resolve these backends?
  • Is additional configuration required?

If not:

  • Should Knative net-gateway generate ClusterIP Services instead?

Suggested Fix / Direction

Possible options:

  1. Avoid using ExternalName Services for HTTPRoute backends
  2. Generate a ClusterIP Service with real endpoints
  3. Document required configuration for Envoy Gateway compatibility

Environment
  • Knative Serving: v1.20.2
  • Gateway API: v1.4.1
  • Envoy Gateway: v1.7.2
  • Kubernetes: v1.32.9+rke2r1
  • CNI: Cilium

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Gateway API setup described in the issue and tracing the generated HTTPRoute and ExternalName Service in net-gateway-api. There is no source file or test named in the report. Done means establishing the expected backend behavior, choosing a compatible implementation or documentation change, and verifying that Envoy Gateway no longer reports EndpointsNotFound or returns 503.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.