Kubernetes
Ingress
HTTP Backend
Troubleshooting
Cloud Deployment

endpoints “default-http-backend” not found in Ingress resource

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

In K8s (Kubernetes), the concept of an Ingress resource is pivotal to managing external access to services within a cluster. This resource defines rules and routing configurations that manage how external HTTP/S requests are handled and redirected to the appropriate internal services. However, users might encounter the perplexing issue of "endpoints default-http-backend not found" when dealing with Ingress resources. Let's delve into the underlying causes and solutions for this scenario, exploring the intricacies involved.

Understanding the Issue

Ingress Basics

Before dissecting the problem, it's vital to grasp how an Ingress functions:

  • Ingress Resource: Acts as a layer 7 (application layer) entry point, providing HTTP/S routing to backend services based on hostnames and URI paths.
  • Ingress Controller: A daemon running in the cluster that interprets the Ingress rules and configures a load balancer (e.g., NGINX, Traefik) to manage traffic to these services.

The Problem

The error message "endpoints default-http-backend not found" typically appears due to the absence of a default backend service. When there's a mismatch or absence of defined rules, Ingress might fall back to a default backend, meant to handle unrouted or misrouted traffic by providing a default response, usually a 404 error.

Components in Play

To understand where the failure might be occurring, consider these components:

  • Endpoints: A reference to a set of IP addresses that indicate where a service is running.
  • Service: Kubernetes' way of exposing a set of pods as a network service.
  • Default HTTP Backend: A Kubernetes convention for a fallback HTTP service, usually returning a 404 response for unmapped routes.

Why the Error Occurs

Misconfigured or Missing Default Backend

  1. Service Not Defined: The Ingress Controller relies on a service named default-http-backend . If this service isn't configured or has been deleted, the controller cannot route undefined paths appropriately.
  2. Endpoint Misconfiguration: Endpoints for the default-http-backend service might not exist or be improperly defined. This can occur due to issues in service definitions, failed deployments, or offline pods.
  3. Ingress Misconfigurations: There could be rules defined in the Ingress that expect a default-http-backend , but due to typos or misplaced configurations, the backend isn't found.

Example Configuration

Let's explore a possible configuration scenario and identify what might go wrong:

Ingress Resource Configuration

  • host: myapp.example.com
    • path: /
  • port: 80
    • name: default-http-backend
      • containerPort: 8080
  • port: 80

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track 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.

Practice system design

All Rights Reserved.