NGINX Ingress Controller on GKE | Generated by AI

Home 2026.01

Question: Introduction to NGINX Ingress Controller in GCP

Answer:

The NGINX Ingress Controller is one of the most popular ways to expose HTTP/HTTPS services in Kubernetes clusters, including those running on Google Kubernetes Engine (GKE) in Google Cloud Platform (GCP).

What is an Ingress in Kubernetes?

An Ingress is a Kubernetes API object that manages external access (mainly HTTP and HTTPS) to services inside the cluster. It provides:

However, Kubernetes itself does not include a built-in Ingress controller implementation — it only defines the API. You need to install a controller that actually implements this API.

NGINX Ingress Controller vs GKE’s built-in Ingress

Feature GKE Built-in Google Cloud Load Balancer Ingress NGINX Ingress Controller
Controller type Google-managed (GCLB) Community / F5 NGINX open-source
Load balancer provisioned External HTTP(S) Load Balancer Also External HTTP(S) Load Balancer
Setup complexity Very simple (type: Ingress) Requires installing controller first
Features Good integration with Google Cloud features Much richer annotations & configuration
Advanced routing Basic Excellent (regex, rewrites, rate limiting, auth, canary, mirroring, …)
TLS termination At Google Cloud Load Balancer At NGINX or at Google LB (both possible)
Cost Google LB charges apply Same LB charges + node costs
Best for Simple setups, Google ecosystem preference Complex routing, advanced features, multi-cloud

Most teams choose NGINX Ingress when they need more powerful routing capabilities than what the native GKE Ingress offers.

How NGINX Ingress Works on GKE (High-level)

  1. You deploy the NGINX Ingress Controller as a Deployment + Service (type LoadBalancer) in your GKE cluster.
  2. GKE automatically provisions a Google Cloud HTTP(S) Load Balancer in front of it.
  3. The controller watches for Ingress objects in the cluster.
  4. When you create an Ingress resource, NGINX gets configured dynamically to route traffic accordingly.

Quick Comparison of Installation Methods on GKE (2025/2026)

Minimal Example Usage

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"           # important on GKE
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  ingressClassName: nginx                         # recommended way in newer versions
  rules:
  - host: api.yourdomain.com
    http:
      paths:
      - path: /api(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: api-service
            port:
              number: 8080

Typical Reasons People Choose NGINX Ingress on GKE

Summary Recommendation (2026)

References:


Back

x-ai/grok-4.1-fast

Donate