惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
人人都是产品经理
人人都是产品经理
H
Heimdal Security Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog
A
About on SuperTechFans
V2EX - 技术
V2EX - 技术
小众软件
小众软件
博客园 - Franky
博客园 - 司徒正美
P
Privacy International News Feed
爱范儿
爱范儿
U
Unit 42
博客园 - 叶小钗
The Hacker News
The Hacker News
C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic
D
Docker
T
Threatpost
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
L
LINUX DO - 最新话题
Security Latest
Security Latest
T
The Exploit Database - CXSecurity.com
S
SegmentFault 最新的问题
A
Arctic Wolf
Spread Privacy
Spread Privacy

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Ingress not routing to service: a 7-step fix checklist
Muskan · 2026-06-23 · via DEV Community

Quick take

A broken Ingress is almost always one of seven things, and they fail loudly enough to spot in under five minutes. The bug is rarely in the Ingress object itself. It is usually in the Service selector, the Endpoints, the controller, or DNS. Here is the seven-step checklist I run every time, in order, before opening a ticket.

If you only remember three things, remember these:

  • Read the Ingress controller pod logs first. Half the time, the answer is there.
  • kubectl get endpoints <service> tells you instantly if the Service is even pointing at pods.
  • curl from inside the cluster before debugging external DNS or load balancer issues.

Step zero: the diagnostic stack

The Ingress request path has five layers. Most failures live in exactly one of them.

  1. DNS resolves the host to a load balancer or controller IP.
  2. The external load balancer (ALB, GCLB, Azure Application Gateway) forwards to the Ingress controller.
  3. The Ingress controller pod (nginx, Traefik, Contour, AWS Load Balancer Controller) matches the Ingress rule.
  4. The controller forwards to a Service.
  5. The Service forwards to a backend Pod via Endpoints.

Diagnose from the bottom up. Start with the Pod and walk back to DNS. Working downstream from the user (DNS first, then LB) wastes time because you cannot rule out the inner layers until you have proven them healthy.

1. Is the Pod actually healthy?

The first check, always. A 502 or empty response is often "the Pod is not Ready" wearing different clothes.

  • kubectl get pods -l app=<your-app>: are all pods in Running state with READY 1/1?
  • kubectl describe pod <pod>: any failing readiness probes?
  • kubectl logs <pod>: is the app actually serving on the port you think?

A pod that crashes on startup or fails readiness will be silently removed from the Service's Endpoints list, and Ingress will route to nothing. This is the single most common root cause.

2. Do the Service selectors match the Pod labels?

This is the bug that takes the longest to find because nothing in the error message hints at it.

Run kubectl get endpoints <service-name>. If the ENDPOINTS column is empty or says <none>, the Service selector does not match any Pod labels.

Common selector traps:

  • Pod label is app.kubernetes.io/name: payments, Service selector is app: payments. They are different keys.
  • A Helm upgrade changed the label key from app to app.kubernetes.io/name. The Service still has the old selector.
  • The Service is in a different namespace than the Pods.

Fix by matching the selector exactly to a label that is actually on the Pods.

3. Does the Service port map to the Pod port?

The Service has a port (what callers hit) and a targetPort (what the Pod listens on). Get these wrong and you see "connection refused" or empty 502 responses.

kubectl describe service <name> shows both. The targetPort must match the containerPort in the Pod's container spec, or match a named port defined in that spec.

A surprisingly common bug in 2026: the app was changed from listening on 8080 to 3000, but the Service still points at 8080. The container is up, healthy, and serving on the wrong port.

4. Is the Ingress controller running and watching this Ingress?

The Ingress object is just a configuration entry. Without a controller pod watching for it, nothing routes.

Two checks:

  • kubectl get pods -n <ingress-controller-namespace> (commonly ingress-nginx, kube-system, or traefik). Are the controller pods Running?
  • kubectl get ingress <name> -o yaml | grep ingressClassName. Does the value match the IngressClass the controller is configured to watch?

The ingressClassName mismatch is the most common cause when a brand-new Ingress just sits there with no ADDRESS populated. Default IngressClass changed in K8s 1.22 from an annotation to a spec field. Older manifests using the annotation are silently ignored by newer controllers.

5. Are the host and path rules correct?

The Ingress matches on host and path. Both are easier to get wrong than they look.

  • host: api.example.com is exact match by default. If your request comes in as Host: API.example.com (uppercase) or Host: api.example.com:443 (with port), the rule may not match on some controllers.
  • pathType: Exact vs pathType: Prefix: Exact matches the full path. Prefix matches anything starting with the path. A rule for /api with Exact will not match /api/users.
  • Path order matters in some controllers. /api/v1 before /api is important if both rules exist, because longest-prefix usually wins, but not always.

Test with curl -H "Host: api.example.com" http://<controller-ip>/your/path from inside the cluster to bypass DNS and the external load balancer.

6. Are the controller annotations doing something unexpected?

Annotations are where the Ingress spec hides its complexity. Three to check.

  • nginx.ingress.kubernetes.io/rewrite-target: if set, the path your backend receives is not the path the user sent. A wrong rewrite causes the app to return 404 even though the Ingress matched.
  • nginx.ingress.kubernetes.io/ssl-redirect: "true": an HTTP request to a TLS-enabled Ingress gets a 308 redirect. If your test client does not follow redirects, you see "no response."
  • nginx.ingress.kubernetes.io/backend-protocol: HTTPS: if your backend speaks HTTP but the annotation says HTTPS, you get TLS handshake errors deep in the controller logs.

Strip annotations one at a time and re-test until the request flows.

7. Is DNS or the external load balancer broken?

Last layer to check. The reason it is last is that you cannot rule out the inner layers until you have proven them healthy.

  • dig <your-host> or nslookup. Does the host resolve at all? Does it resolve to the LB you expect?
  • Hit the LB directly with the Host header: curl -H "Host: api.example.com" http://<lb-ip>/. If this works and the DNS-based request does not, your DNS is wrong.
  • LB health checks: if the load balancer marks the controller pods unhealthy (wrong health check path, wrong port), it stops routing to them. Check the LB's target group health.

On AWS, the AWS Load Balancer Controller sometimes provisions the ALB with a default health check at / that returns 404 from your app, marking everything unhealthy. Set alb.ingress.kubernetes.io/healthcheck-path explicitly.

Common pitfalls I keep seeing

  • Empty Endpoints list ignored. The output says <none> and the team assumes it's fine. It is never fine.
  • NetworkPolicy blocking the controller. A namespace-level deny-all NetworkPolicy will block the ingress-nginx pod from reaching the Service. Allow ingress from the controller namespace explicitly.
  • TLS cert not provisioned. cert-manager failed to issue, the secret is empty, and the controller serves a default cert that browsers reject. Check kubectl describe certificate.
  • IngressClass deleted but Ingress still referencing it. Happens during cluster migrations. The Ingress just sits there with no controller picking it up.

Where this checklist still falls short

The honest part.

Service mesh interception. If Istio, Linkerd, or another mesh sidecar is in play, the traffic path is more complex than five layers. The mesh may strip headers, redirect TLS, or apply its own routing rules. Disable the mesh sidecar in a test namespace to isolate.

Multi-cluster gateways. Gateway API in 2026 supports cross-cluster routing. If your Gateway is in cluster A and the Service is in cluster B, none of the single-cluster debugging steps apply. Inspect the Gateway controller's cross-cluster mesh state.

WebSocket and gRPC. Plain HTTP works but the upgrade fails. The Ingress controller needs explicit annotation support (nginx.ingress.kubernetes.io/upstream-protocol: grpc for gRPC, longer timeouts for WebSocket). Same five-step checklist applies, but the path is more subtle.

Frequently asked questions

Why does kubectl get ingress show no ADDRESS?
Almost always the IngressClass mismatch from Step 4. The controller is not picking up the Ingress because the class does not match.

Why is my Ingress returning 502 Bad Gateway?
Three usual suspects: empty Endpoints (Step 2), wrong port mapping (Step 3), or the Pod is up but the app crashes on requests (Step 1, but check the logs).

Why does the Ingress work for /foo but not /foo/bar?
pathType: Exact is set when you wanted Prefix. Switch to Prefix and re-test.

Does any of this change with Gateway API?
The diagnostic shape is the same: HTTPRoute selectors, backend Service health, controller pod status. The names differ but the failure modes are nearly identical to classic Ingress.

What was the last Ingress incident that took too long to diagnose?

If a 502 burned half a sprint last quarter, the question worth asking is which of the seven steps would have caught it in five minutes. Drop the symptom in the comments. I will tell you the step I would have run first.