Last reviewed: November 10, 2026 (Asia/Shanghai); primary references checked November 9 UTC.
Direct answer
A Kubernetes Ingress review should resolve the rendered ingressClassName to the intended controller, trace each host and path to the correct Service port, and verify the certificate presented at the intended endpoint. Require requests just inside and outside each routing boundary, with an identifiable fixture backend. A successful request to one URL cannot establish that other hosts, neighboring paths, or TLS identities behave correctly.
The Kubernetes Ingress reference
defines Prefix matching by path elements: /api matches /api/items, but does not match /apix. It also leaves unmatched-request handling to the controller when no default backend is configured. Those details make a request matrix more useful than a single successful smoke test.
Who this is for
Use this workflow when a coding agent edits an existing networking.k8s.io/v1 Ingress, its Helm values, or its Kustomize overlays. It suits maintainers reviewing ordinary HTTP and HTTPS routing through an already installed controller.
Give the agent the approved controller class, hostnames, paths, Service ports, certificate requirements, and affected environments. Ask for rendered manifests and proposed acceptance checks. Use the team’s approved disposable environment for fixture changes. The examples below are recommendations; no cluster tests or deployments were performed for this article.
The official references recommend Gateway for new work and describe Ingress as a stable, frozen API with no planned removal. Check the lifecycle and documentation of the actual controller separately before approving changes to an existing installation.
Key takeaways
- Record the IngressClass name, its controller identifier, and the installed implementation and version.
- Review the complete rendered object, including annotations, omitted hosts, and default backends.
- Test path-element boundaries, case sensitivity, and any overlapping rules.
- Keep the HTTPS URL hostname intact when directing a test to a specific endpoint.
- Assert HTTP status and backend identity separately from curl’s transfer exit status.
- Pair negative cases with healthy positive controls and retain the exact candidate revision.
Sources checked
Three primary references were retrieved successfully on November 9, 2026 UTC:
- Ingress defines controller prerequisites, host and path rules, matching precedence, IngressClass references, default backends, and the standard TLS termination model. Its displayed modification date is November 24, 2025.
- Ingress Controllers explains controller installation, multiple-controller selection, default-class assignment, and implementation differences. Its displayed modification date is September 2, 2026.
- curl: How To Use documents address overrides, certificate verification, CA files, proxy selection, time limits, and response capture used in the proposed client checks.
These maintained technical references support an evergreen review task. Match Kubernetes behavior to the target release and consult the installed controller’s versioned documentation for every annotation or implementation-specific feature. The curl examples use established options; retain curl --version with the test evidence.
Contract details to verify
Write the complete route before editing it
For the fixture in this guide, requests to app.review.example under /api must reach the harmless API fixture through the approved test controller. The API returns a stable marker such as review-api-v1 and echoes the received path. Unlisted hosts and paths must follow the agreed unmatched-request policy without returning that API marker.
| Contract item | Evidence to attach to the patch |
|---|---|
| Candidate | Revision, renderer version and command, values or overlay, and final manifests |
| Controller | IngressClass name, spec.controller, implementation version, and relevant configuration |
| Request | Client network, endpoint, scheme, hostname, port, method, and path |
| Destination | Service name and Service port, expected fixture marker, and received path |
| TLS | TLS host list, Secret reference, certificate identity and validity, and client trust configuration |
| Unmatched traffic | Expected status or response marker for unlisted hosts and paths |
| Acceptance | Positive results, boundary cases, controlled regressions, and restoration evidence |
Render every affected environment. A chart can preserve the intended host in its defaults while an environment override removes it. Inspect annotations alongside ordinary fields: the Ingress reference explicitly describes controller-specific annotation behavior. Require documentation and tests for a proposed rewrite, authentication annotation, or redirect rather than inferring its effect from the annotation’s name.
The Service review guide covers backend selection and Service-to-Pod port resolution. The NetworkPolicy review guide covers permitted network connections when the patch also changes that layer. Keep both checks attached when they affect the same route.
Resolve the class to the installed controller
spec.ingressClassName refers to an IngressClass resource. Inspect that resource’s spec.controller and any parameters, then compare them with the installed controller’s configuration. A familiar class name alone does not identify the intended implementation or exposure.
These read-only examples assume an authorized test context named review-cluster and a namespace named agent-review:
kubectl --context review-cluster get ingressclass review-edge -o yaml
kubectl --context review-cluster --namespace agent-review \
get ingress review-api -o yaml
kubectl --context review-cluster --namespace agent-review \
describe ingress review-api
The controller reference says that, with exactly one default IngressClass, Kubernetes assigns that class when the field is omitted. Controllers can also differ in how they handle classless objects. Prefer an explicit approved class in the candidate, and inspect the admitted object’s effective value. Removing a class is a routing-policy change that needs an explanation.
Inventory other Ingresses handled by the same controller for overlapping hosts and paths. The Kubernetes precedence rules below describe matches within an Ingress; do not extend them into an undocumented rule for conflicts across separate objects. Use the implementation’s conflict policy and diagnostics when another object claims the same route.
Make path semantics visible in the manifest
This example assumes an existing review-edge class, a healthy review-api Service exposing port 80 in agent-review, and an approved TLS Secret for app.review.example. The reserved example hostname must be replaced or configured in the fixture environment. This is an Ingress example, not a complete application deployment.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: review-api
namespace: agent-review
spec:
ingressClassName: review-edge
tls:
- hosts:
- app.review.example
secretName: review-api-tls
rules:
- host: app.review.example
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: review-api
port:
number: 80
The backend number 80 selects the Service port. Resolve the subsequent Service-to-Pod mapping separately; the application might listen on 8080. Do not infer a path rewrite from Prefix. Keep the fixture capable of accepting /api/..., and verify the received path if the real patch introduces a controller-specific rewrite.
The Ingress reference
defines Exact as case-sensitive exact matching and Prefix as case-sensitive matching by slash-separated elements. ImplementationSpecific delegates matching behavior to the IngressClass. Require a controller-specific explanation when an agent introduces it.
For the manifest above, write these expectations before testing:
| Request host | Request path | Expected routing |
|---|---|---|
app.review.example | /api | API fixture |
app.review.example | /api/ | API fixture |
app.review.example | /api/items | API fixture, with received path verified |
app.review.example | /apix | Unmatched-request policy |
app.review.example | /API | Unmatched-request policy |
unlisted.review.example | /api | Unmatched-request policy |
For overlapping paths within one Ingress, the longest matching path wins; equally matched paths prefer Exact over Prefix. If the candidate contains such rules, test a distinct backend marker for each branch. If it introduces a wildcard host, test both the intended single-label name and excluded names: *.review.example matches a.review.example, while review.example and b.a.review.example fall outside that wildcard.
A rule with no host can match traffic without the intended hostname. A / Prefix matches all paths for its applicable host. Inspect these broad rules and default backends before interpreting an unexpected successful response.
Verify TLS while targeting the intended endpoint
Check that the TLS host list agrees with the route host, that the referenced Secret supplies the intended certificate, and that the client trusts its issuer. Keep private keys and Secret values out of the pull request evidence. Record certificate identity, validity, and a public certificate fingerprint through the team’s approved inspection tools.
The standard model in the Ingress reference terminates TLS at the ingress point and assumes plaintext traffic onward to the Service and Pods. If the requirement includes encrypted upstream traffic, require the installed controller’s explicit configuration and separate upstream evidence. Client-facing HTTPS alone does not establish that property.
Use curl’s --resolve to connect to a chosen fixture address while retaining the hostname in the URL. The curl manual
documents that override and explains that normal TLS verification checks the certificate against the URL hostname and trusted CA certificates.
The following command assumes approved direct connectivity to the test endpoint. Replace the documentation address 203.0.113.10 with its verified IPv4 address. review-ca.pem contains the approved fixture CA certificates; omit --cacert when the ordinary trust store already supplies the intended trust.
ingress_review_scheme='https'
ingress_review_host='app.review.example'
ingress_review_ip='203.0.113.10'
curl -q --noproxy '*' --http1.1 \
--resolve "${ingress_review_host}:443:${ingress_review_ip}" \
--cacert ./review-ca.pem \
--connect-timeout 3 --max-time 10 \
--silent --show-error \
--dump-header ingress-positive.headers \
--output ingress-positive.body \
--write-out 'http_code=%{http_code} remote_ip=%{remote_ip}\n' \
"${ingress_review_scheme}://${ingress_review_host}/api/items"
Record the command’s exit status immediately, then assert the expected HTTP status and review-api-v1 marker in the saved response. Without --fail, curl can complete an HTTP error response successfully; a zero exit status alone cannot approve routing. Keep redirects visible and evaluate their status and Location against the contract before following them.
-q is first so curl does not load its default configuration file. The explicit proxy bypass makes this a direct endpoint check; if the intended client uses a proxy, record and test that client path separately. The command verifies neither ordinary DNS nor the whole production path. After the endpoint check, repeat the positive request using the intended DNS configuration and client network.
Separate HTTP host routing from TLS identity
For the wrong-host case, repeat the bounded HTTPS command with the same URL and address override, add --header 'Host: unlisted.review.example', and use separate output filenames. With this HTTP/1.1 test, the URL still supplies the TLS hostname while the header exercises an unlisted HTTP host. Retain the actual status and response marker; require that the API fixture is not returned.
Changing the HTTPS URL’s hostname to unlisted.review.example would also change the TLS hostname. A certificate error at that earlier stage would leave the HTTP routing rule untested. Keep those questions separate in the evidence.
For a TLS negative control, configure the isolated fixture to serve a trusted certificate for a different name. Require a hostname-verification failure and retain certificate-selection diagnostics. If the controller rejects the update or retains the previous certificate, record that behavior and repair the fixture; it does not demonstrate client rejection of the proposed wrong certificate.
Exercise controlled regressions and preserve the first result
Start from a healthy baseline, change one dimension at a time, and restore it between cases. Use bounded observations after the controller reconciles. Record object UID and resource version, candidate revision, controller diagnostics, request target, curl result, HTTP status, and backend marker together.
| Controlled change | Required evidence |
|---|---|
| Replace the approved class with an unexpected class | Manifest-policy check rejects the controller choice before deployment |
Change /api from Prefix to Exact | /api/items no longer satisfies the intended route; the test catches the regression |
| Remove the rule’s host | The unlisted-host case detects unintended API access, subject to the recorded controller policy |
| Reference a missing Service port in an isolated fixture | Diagnostics identify the backend problem; another route’s success cannot approve this one |
| Serve a trusted certificate for the wrong hostname | Client verification rejects the presented identity, with certificate-selection evidence |
Keep a contemporaneous healthy positive control around negative routing cases. A controller outage or refused connection cannot establish correct handling of an unmatched host. When the result differs from the contract, preserve the first failure and investigate class selection, route conflicts, controller reconciliation, backend health, and certificate selection before asking the agent for a repair.
Failure modes
API acceptance is treated as a working route. An Ingress needs a running controller. Inspect its handling of the exact object and exercise the endpoint.
A substring test approves a Prefix rule. Include /apix beside /api/items; the path-element boundary distinguishes them.
An arbitrary 404 is accepted as proof. Confirm the endpoint, a working positive control, and the agreed default response or controller diagnostic.
An IP-address URL replaces the application hostname. Retain the hostname in the HTTPS URL and direct the connection with --resolve.
Certificate verification is disabled to make a check pass. Supply the approved CA when needed and repair certificate identity or selection. Verification is part of the acceptance contract.
FAQ
Does an Ingress resource install its controller?
No. The Kubernetes documentation requires a separately installed controller. Creating the resource alone has no routing effect.
Does Prefix: /api include /apix?
No. Prefix matching uses slash-separated path elements. /api/items matches; /apix does not.
Must an unmatched request return 404?
The result depends on the configured default backend and controller behavior. Define the required result for the installation and test it with a healthy positive control.
Does a valid HTTPS response prove upstream encryption?
It proves only what was tested on the client-facing connection. Review the controller-to-backend configuration and that connection separately when encryption is required there.
Reader next step
Choose one agent-written Ingress patch. Attach the resolved controller class, rendered host-and-path table, Service port reference, and certificate expectations. In the approved disposable environment, run the positive route, neighboring path, wrong HTTP host, and wrong-certificate checks. Approve the change when the exact candidate’s controller evidence and client observations satisfy the same route contract.