Skip to main content
Networking & service meshLesson 2 of 11

Ingress Rules and TLS

Create one Ingress rule. Follow who reads it, where HTTPS is decrypted, and when connections silently fail with no error.

Requestshop.example.com/api/orders
Matched rule—
Target Service—
HTTPS—
Kubernetes clusterBrowserHTTPS requestControllerIngress impl.IngressHost · path rulesIngressClassPicks the handlerTLS SecretCert · keywebPath /apiPath /apicartNo ServiceHTTPS
RequestWatchAppears in a later step

What you will learn

  • An Ingress is a rule document; the controller receives requests
  • How host and path rules pick a Service
  • The IngressClass picks which implementation handles it
  • TLS termination: decrypting HTTPS at the entry with a Secret's certificate
  • How missing backends and overlapping rules fail with no error

Try it yourself​

kubectl get ingressclass # Available handlers and the default class
kubectl get ingress shop -o wide # CLASS, HOSTS, ADDRESS
kubectl describe ingress shop # Backends per path and events
kubectl get endpointslices -l kubernetes.io/service-name=api # Does the backend Service select pods?
kubectl get secret shop-tls -o jsonpath='{.type}' # Is it kubernetes.io/tls?

Check yourself

  1. An Ingress was created without error, but the ADDRESS column in kubectl get ingress stays empty. What should you suspect first?
  2. Rules / → web and /api → api both use Prefix. Where does /api/orders go?
  3. For HTTPS, what must the Secret named in the Ingress tls field be?

Further reading: Ingress · Ingress controllers · Gateway API