Could not access Kubernetes Ingress in Browser on MacBook
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
When Ingress works in Kubernetes but not in a browser on a MacBook, the problem is usually not the browser itself. The usual causes are missing local DNS mapping, no ingress controller running, or using a local Kubernetes environment where the ingress address is not exposed the way a cloud cluster would expose it.
First Check the Controller, Not Just the Ingress Object
An Ingress resource is only routing configuration. It does nothing until an ingress controller is running and watching it.
Start with these checks:
If no ingress controller is running, the resource can exist perfectly and still never answer traffic.
A Minimal Working Ingress Example
This only says that requests for demo.local should be routed to demo-service. Your Mac still needs to resolve demo.local to the right IP.
MacBook Local DNS Is Often the Missing Piece
On a local machine, demo.local is not automatically meaningful. You usually need to map the hostname manually in /etc/hosts.
For local environments such as Minikube, the target may be the Minikube IP:
Then add an entry such as:
If your local Kubernetes setup exposes the ingress controller on 127.0.0.1, then map the host there instead. The right address depends on the local cluster implementation.
Minikube-Specific Path
If you are using Minikube, make sure the ingress addon is enabled:
Then check the controller pods again. In some local setups, you may also need minikube tunnel or another exposure mechanism depending on how the controller service is published.
The key is that a browser on macOS must be able to reach the ingress controller's actual listening address, not just the cluster-internal service name.
Test Routing Without the Browser First
Before blaming Safari or Chrome, test the route with curl.
If that works, the ingress rule and controller are fine, and the remaining issue is local hostname resolution.
If that fails, inspect the backend service and endpoints:
An ingress controller cannot route to a service that has no healthy endpoints.
Do Not Skip the Service Layer
Sometimes the ingress rule is fine and the browser host resolves correctly, but the backend Service points to the wrong port or selector. If the service cannot reach pods, the ingress controller has nothing useful to forward traffic to.
Common Pitfalls
The biggest pitfall is thinking the Ingress object itself exposes traffic. It does not. The controller does.
Another issue is forgetting the /etc/hosts mapping on a MacBook for custom local hostnames such as demo.local.
Developers also sometimes test only in the browser without checking curl and kubectl describe ingress. That makes it harder to tell whether the failure is DNS, routing, or backend health.
Finally, remember that local Kubernetes environments differ. Minikube, Docker Desktop, and kind do not always expose ingress traffic the same way, so copy-pasted cloud instructions may not apply directly.
Summary
- Make sure an ingress controller is actually running.
- Verify the ingress resource, service, and endpoints separately.
- On macOS, custom local hostnames usually need an
/etc/hostsentry. - For Minikube, use the Minikube IP and enable the ingress addon.
- Test with
curland aHostheader first so you can separate DNS issues from Kubernetes routing issues.
Related reading
- Couldn't access Kubernetes dashboard on Google Cloud
- couldn't get current server API group list the server has asked for the client to provide credentials error You must be logged in to the server
- couldn't get current server API group list the server has asked for the client to provide credentials error You must be logged in to the server
- Create a kubernetes cluster using Disks is not allowed in GCP
- Could not auto-determine entry point from rollupOptions
- Could not automatically select an Xcode project
- Create a patch to add a kubernetes annotation
- Create fake data for rest mapper running in Kubernetes

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.