liveBook · Manning

Ingress object

As explained in Server-Side WebAssembly

An Ingress is a Kubernetes API resource that defines routing of external HTTP traffic to services based on hostnames or paths.

An Ingress is a Kubernetes API resource that provides a stable external endpoint by routing HTTP requests to a service using paths or hostnames. It replaces local port forwarding with a deployment-style traffic entry point. section 8.2.3

Route traffic to a Spin service

A networking.k8s.io/v1 Ingress named nginx sends requests matching the / prefix to the scaling-spin service on port 80. Consequently, /load reaches the service without port forwarding. section 8.2.3

Listing 8.7 Ingress resource
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: scaling-spin
            port:
              number: 80

Inspect the complete Ingress manifest, including its API version, HTTP rule, prefix path, backend service, and port. section 8.2.3

How Server-Side WebAssembly covers it

How deep it goes
Defines a complete path-prefix manifest and contrasts it with port forwarding, but does not detail controller internals.
Examples
Uses the scaling-spin service, the / path prefix, port 80, and a kubectl-applied Ingress manifest.
What it assumes
Assumes a Kubernetes cluster and service, while contrasting Ingress with familiar local port forwarding.
What you can do after
Operate/configure an Ingress manifest that forwards HTTP paths to a Kubernetes service.
How it connects
Connects HTTP traffic with Kubernetes services, Ingress controllers, path prefixes, hostnames, and port forwarding.

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 Server-Side WebAssembly. The section links point to the parts of the book it draws on.