How to publicly expose Traefik ingress controller on Google Cloud Container Engine?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
To expose Traefik publicly on Google Kubernetes Engine, the important step is not the Ingress resource first. It is giving the Traefik controller itself an external entry point. On GKE, that usually means running Traefik behind a Kubernetes Service of type LoadBalancer, then pointing DNS to the allocated public IP.
Deploy Traefik with a Public Load Balancer
The cleanest path is usually Helm. A minimal install looks like this:
On GKE, a LoadBalancer Service causes Google Cloud to provision an external load balancer and assign a public IP. You can confirm that with:
Wait until the EXTERNAL-IP field contains a real address rather than pending.
Understand the Traffic Flow
The traffic path is normally:
- public IP on the Google load balancer
- Traefik Service of type
LoadBalancer - Traefik Pods
- backend Kubernetes Services
- application Pods
That means your application Services usually stay internal as ClusterIP. Traefik is the public edge, and it routes requests to those internal Services.
Expose an Application Through Traefik
Once Traefik is reachable, create an Ingress object that routes a hostname to your application Service:
This assumes your application Service already exists and listens on port 80.
If you want HTTPS, configure Traefik entrypoints and certificates, then route traffic to the secure entrypoint instead of plain web.
Attach DNS to the External IP
After the Traefik Service has an external IP, create a DNS A record for your hostname:
- '
demo.example.compoints to the Traefik external IP'
Without DNS, the load balancer is public but users still have no memorable hostname. If you use a static IP in Google Cloud, you can reserve it first and bind it so redeployments do not change the address unexpectedly.
Keep the Controller Public, Not Every App
One common mistake is exposing every application with its own LoadBalancer Service. That works, but it defeats much of the purpose of an ingress controller. A better pattern is:
- one public Traefik entry point
- many internal application Services
- hostname or path routing inside Traefik
This keeps networking simpler and usually cheaper.
Verify from Both Kubernetes and the Network Edge
Use both cluster-side and client-side checks:
The curl command is useful before DNS fully propagates. It lets you test Traefik routing by sending the intended host header directly to the load balancer IP.
Common Pitfalls
- Forgetting to set the Traefik Service type to
LoadBalancer. - Waiting on the Ingress resource while the Traefik controller itself is still private.
- Exposing backend applications directly instead of routing through Traefik.
- Omitting DNS and then wondering why the hostname does not resolve.
- Debugging application Pods when the real issue is that the Traefik external IP is still pending.
Summary
- On GKE, public Traefik exposure usually starts with a
LoadBalancerService for the Traefik controller. - Your backend application Services can remain internal as
ClusterIP. - Ingress resources tell Traefik how to route hostnames and paths to those internal Services.
- Point DNS at the external IP once Google Cloud allocates it.
- Verify both the Service external IP and the actual host-based routing before blaming the application.

