-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Comments
Hi @zhouyp520, the 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 |
|
This error saying, u are missing an endpoint to be shown, when there is no route matched. i.e. 404 rule |
|
I think this is related to kubernetes/kubernetes#107720 |
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:
http:
paths:
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:
targetPort: 8000
type: ClusterIP
selector:
app: hello-node
The text was updated successfully, but these errors were encountered: