liveBook · Manning

Ingress object

As explained in Platform Engineering on Kubernetes

A Kubernetes Ingress is a resource that defines routing for traffic entering a cluster from external clients toward internal services.

A Kubernetes Ingress declaratively defines how traffic entering a cluster from external clients reaches services inside it. It provides a controlled entry point instead of exposing each service independently. section 2.1.2 section 2.3.6

Use an Ingress to:

  • Route requests through a single entry point. section 2.3.6
  • Apply path-based routing to direct traffic to different services. section 2.3.6
  • Reference service names rather than container IP addresses. section 2.3.6
  • Keep routing rules simple; business logic does not belong at this layer. section 2.3.6

Inspecting the frontend Ingress

Run `kubectl get ingress` to list resources, then `kubectl describe ingress conference-frontend-ingress` to inspect its controller, host, path, backend, address, and events. A representative rule routes `/` to the `frontend` service on port 80, which forwards to the application’s container endpoints. section 2.3.6

Listing 2.8 Describing the Ingress resource
Name:             conference-frontend-ingress
Labels:           app.kubernetes.io/managed-by=Helm
Namespace:        default
Address:          localhost
Ingress Class:    nginx
Default backend:  <default>
Rules:
  Host        Path  Backends
  ----        ----  --------
  *           
              /   frontend:80 (10.244.1.6:8080,10.244.2.9:8080)   #1
Annotations:  meta.helm.sh/release-name: conference
              meta.helm.sh/release-namespace: default
              nginx.ingress.kubernetes.io/rewrite-target: /
Events:       <none>

Inspect the rendered Ingress details, including the nginx class, localhost address, root path, frontend backend, and rewrite annotation. section 2.3.6

How Platform Engineering on Kubernetes covers it

How deep it goes
Explains service-name and path-based routing, inspection commands, and controller requirements, but defers detailed resource management.
Examples
Uses a frontend backend, the root path, nginx, localhost, and kubectl get and describe commands.
What it assumes
Assumes familiarity with Kubernetes services and requires an Ingress controller, such as nginx, to process the rules.
What you can do after
Operate/configure Ingress resources with kubectl and route external paths to named Kubernetes services.
How it connects
Connects Ingress with Kubernetes services, service discovery, Ingress controllers, deployments, and path-based routing.

Also explained in

Compare how 8 books explain ingress object →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.