Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: endpoints "default-http-backend" not found #966

Closed
zhouyp520 opened this issue May 24, 2020 · 5 comments
Closed

error: endpoints "default-http-backend" not found #966

zhouyp520 opened this issue May 24, 2020 · 5 comments
Assignees

Comments

@zhouyp520
Copy link

zhouyp520 commented May 24, 2020

kubectl describe ingress demo-app

Name: demo-app
Namespace: default
Address:
Default backend: default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
Host Path Backends


www.happylau.cn
/ demo-svc:8000 (10.244.3.61:8000,10.244.4.43:8000,10.244.7.29:8000)
Annotations: kubernets.io/ingress.class: nginx
Events:
Type Reason Age From Message


Normal AddedOrUpdated 33s nginx-ingress-controller Configuration for default/demo-app was added or updated
Normal AddedOrUpdated 32s nginx-ingress-controller Configuration for default/demo-app was added or updated
Normal AddedOrUpdated 31s nginx-ingress-controller Configuration for default/demo-app was added or updated

kubernetes 1.18.1

kubectl get pods -n nginx-ingress

NAME READY STATUS RESTARTS AGE
nginx-ingress-2mwj5 1/1 Running 0 33m
nginx-ingress-gjwvr 1/1 Running 0 33m
nginx-ingress-zm2sw 1/1 Running 0 33m

kubectl get svc

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
demo-svc ClusterIP 10.103.253.137 8000/TCP 45m
kubernetes ClusterIP 10.96.0.1 443/TCP 7d1h

cat demo-ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: demo-app
labels:
ingres-controller: nginx
annotations:
kubernets.io/ingress.class: "nginx"
spec:
rules:

  • host: www.happylau.cn
    http:
    paths:
    • path: /
      backend:
      serviceName: demo-svc
      servicePort: 80

cat hello-node.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-app
spec:
replicas: 3
selector:
matchLabels:
app: hello-node
template:
metadata:
labels:
app: hello-node
spec:
containers:
- name: hello-node
image: hello-nodejs:0.2
ports:
- containerPort: 8000
imagePullPolicy: IfNotPresent


apiVersion: v1
kind: Service
metadata:
name: demo-svc
labels:
app: hello-node
spec:
ports:

  • port: 8000
    targetPort: 8000
    type: ClusterIP
    selector:
    app: hello-node
@LorcanMcVeigh
Copy link
Contributor

Hi @zhouyp520,

the (<error: endpoints "default-http-backend" not found>) error is fine, we don't support default-http-backend. However we might implement this in the future #892

Your problem is in the demo-ingress.yaml file the servicePort is set to 80 but in the hello-node.yaml file the port is defined to 8000. Changing the servicePort: 80 to servicePort: 8000 in the demo-ingress.yaml file should fix your problem.

@LorcanMcVeigh LorcanMcVeigh self-assigned this May 25, 2020
@wuqunfei
Copy link

spec: backend: serviceName: nginx-ingress-default-backend servicePort: 8080 rules:

@velcrine
Copy link

velcrine commented Apr 6, 2021

This error saying, u are missing an endpoint to be shown, when there is no route matched. i.e. 404 rule

@warthur1214
Copy link

spec:
  defaultBackend:
    service:
      name: nginx
      port:
        number: 80

@AlexanderYastrebov
Copy link

I think this is related to kubernetes/kubernetes#107720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants