Skip to content

Kubernetes Ingress patterns

Kubernetes Ingress is a Kubernetes API object that manages external access to services within a cluster, typically through HTTP and HTTPS.^[400-devops-06-kubernetes-basics-readme.md] Unlike Services, which primarily operate at Layer 4 (TCP/UDP), Ingress operates at Layer 7, allowing for traffic routing based on hostnames or paths.

Core Architecture

Ingress Controller

An Ingress resource alone has no effect; it requires an Ingress Controller to enforce the rules.^[400-devops-06-kubernetes-basics-readme.md] This controller acts as the reverse proxy or load balancer that processes the traffic.

Common implementations include: * ingress-nginx: An open-source controller supported by the Kubernetes community.^[400-devops-06-kubernetes-k8s.md] * Helm NGINX Ingress: A version of the NGINX controller managed via Helm charts.^[400-devops-06-kubernetes-k8s.md]

Deployment Workflow

Implementing Ingress generally involves two steps: 1. Deploying the controller (e.g., applying a YAML manifest for ingress-nginx).^[400-devops-06-kubernetes-basics-readme.md] 2. Creating Ingress resources that define routing rules for specific applications or namespaces.^[400-devops-06-kubernetes-basics-readme.md]

Local Development and Access

In local development environments (such as using kind), external LoadBalancers may not be available. A common pattern for accessing the Ingress Controller locally is Port Forwarding.^[400-devops-06-kubernetes-basics-readme.md]

This method forwards a local port (e.g., 80) to the controller's service, allowing developers to access applications via localhost as if they were deployed in a public cloud environment.

  • [[Services]]
  • [[Namespaces]]
  • [[Port Forwarding]]
  • kubectl
  • Helm

Sources

^[400-devops-06-kubernetes-basics-readme.md] ^[400-devops-06-kubernetes-k8s.md]