Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

Ingress and Gateway API

Direct answer

Ingress and the Gateway API route external HTTP(S) to Services by host and path through a controller (NGINX, Traefik, cloud LBs, Envoy-based gateways), terminating TLS.

When to use this

Use it to expose web applications, or when routes return 404/502 or wrong certificates.

First 30 seconds

1. kubectl get ingress,gateway,httproute -A.

2. Class/controller matches?

3. Backend Service and endpoints exist?

4. TLS secret valid for the host.

5. Controller logs and test curl -v https://<host>.

Operational verification

client → LB → controller → route by host/path → Service → pod

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms
Scope / prerequisiteUse it to expose web applications, or when routes return 404/502 or wrong certificates.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Confirm the Ingress has an ADDRESS. Test with curl and an explicit Host header. Read the controller logs for the request and its upstream status.

Step 2 Common failures Narrow the fault

A missing or wrong ingressClassName leaves the Ingress unhandled. Path type Prefix versus Exact changes matching. A TLS Secret in another namespace cannot be used.

Key points

An Ingress does nothing without a controller and matching ingressClassName. Gateway API separates infrastructure (Gateway) from routes (HTTPRoute). Check controller logs for config errors.

Key checks
  • kubectl get ingress,gateway,httproute -A — first check for this topic
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl logs <pod> [-c <c>] [--previous] — container logs (incl. previous crash)
  • kubectl get events --sort-by=.lastTimestamp — recent cluster events
ReferenceWhat it is1 section · depth on demand

How it works

The controller watches Ingress (or HTTPRoute) objects and configures its proxy (for example NGINX, Envoy, Traefik). Requests are matched by Host header and path, then forwarded to the endpoints of the backend Service.

ReferenceImportant terms & boundaries3 sections · depth on demand

Ingress vs Gateway API

IngressGateway API
ResourcesIngress + controller annotationsGatewayClass, Gateway, HTTPRoute, …
FeaturesHost/path routing, TLS+ header matching, traffic splitting, cross-namespace delegation
StatusStable, frozenSuccessor, GA since 1.0

ingress-nginx is being retired (2026); plan migration to Gateway API implementations (Envoy Gateway, Cilium, NGINX Gateway Fabric, Istio). Check kubectl describe ingress for backend and TLS errors.

In depth

Ingress and Gateway API both describe HTTP routing into the cluster; a controller (NGINX, Envoy Gateway, Traefik, cloud load balancers …) does the actual work. Without a matching controller the objects do nothing.

Gateway API splits responsibility

ResourceOwned byDefines
GatewayClassPlatform / vendorWhich controller implements it
GatewayCluster operatorListeners: hostname, port, protocol, TLS certificate
HTTPRoute (also GRPCRoute, TLSRoute …)Application teamHost/path/header matches → backend Services, weights

A route attaches to a Gateway through parentRefs; the Gateway's allowedRoutes controls which namespaces may attach.

Worked HTTPRoute with a canary split

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: { name: shop, namespace: shop }
spec:
  parentRefs: [{ name: public, namespace: infra }]
  hostnames: ["shop.example.com"]
  rules:
  - matches: [{ path: { type: PathPrefix, value: / } }]
    backendRefs:
    - { name: shop-v1, port: 80, weight: 90 }
    - { name: shop-v2, port: 80, weight: 10 }

Reading status

kubectl -n shop get httproute shop -o jsonpath='{.status.parents[0].conditions}'
# Accepted=True, ResolvedRefs=True → attached and backends found

Accepted=False with reason NotAllowedByListeners means the Gateway does not allow routes from that namespace or hostname. A backend in another namespace needs a ReferenceGrant in the backend's namespace.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Ingress annotations specific to one controller used on another.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
ingress and gateway apikubernetes ingress controllergateway api httproute
Confirmation

Confirm action

Continue?