Ingress-nginx: Default backend: default-http-backend:80 (<error: endpoints "default-http-backend" not found>)

Created on 9 May 2020  ยท  3Comments  ยท  Source: kubernetes/ingress-nginx

Problem

I installed successfully on k8s 1.16, the ingress controller version 0.32.0 using the command kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-0.32.0/deploy/static/provider/baremetal/deploy.yaml

but when I check the status of the ingress resources, I see the following message

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Describe(kubernetes-dashboard/k8s-dashboard) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Name:             k8s-dashboard                                                                                                                                                      โ”‚
โ”‚ Namespace:        kubernetes-dashboard                                                                                                                                               โ”‚
โ”‚ Address:          95.217.159.244                                                                                                                                                     โ”‚
โ”‚ Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)                                                                                      โ”‚
โ”‚ TLS:                                                                                                                                                                                 โ”‚
โ”‚   kubernetes-dashboard-certs terminates k8s-console.95.217.159.244.nip.io                                                                                                            โ”‚
โ”‚ Rules:                                                                                                                                                                               โ”‚
โ”‚   Host                               Path  Backends                                                                                                                                  โ”‚
โ”‚   ----                               ----  --------                                                                                                                                  โ”‚
โ”‚   k8s-console.95.217.159.244.nip.io                                                                                                                                                  โ”‚
โ”‚                                      /   kubernetes-dashboard-nodeport:443 (10.244.0.31:8443)                                                                                        โ”‚
โ”‚ Annotations:                         Events:                                                                                                                                         โ”‚
โ”‚   Type                               Reason  Age              From                      Message                                                                                      โ”‚
โ”‚   ----                               ------  ----             ----                      -------                                                                                      โ”‚
โ”‚   Normal                             UPDATE  1s (x2 over 9h)  nginx-ingress-controller  Ingress kubernetes-dashboard/k8s-dashboard

Here is the ingress file

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  labels:
    app: kubernetes-dashboard
  name: k8s-dashboard
  namespace: kubernetes-dashboard
spec:
  rules:
  - host: k8s-console.95.217.159.244.nip.io
    http:
      paths:
      - backend:
          serviceName: kubernetes-dashboard-nodeport
          servicePort: 443
        path: /
  tls:
  - hosts:
    - k8s-console.95.217.159.244.nip.io
    secretName: kubernetes-dashboard-certs

How can I resolve that ?

kinsupport

Most helpful comment

So, do we have to expose the port 80

  rules:
  - host: k8s-console.95.217.159.244.nip.io
    http:
      paths:
      - backend:
          serviceName: kubernetes-dashboard-nodeport
          servicePort: 80
        path: /
  tls:
  - hosts:
    - k8s-console.95.217.159.244.nip.io
    secretName: kubernetes-dashboard-certs

even if the application (kubernetes dashboard) starts on port 443/8443 - HTTPS ?

All 3 comments

Closing. There is nothing to fix. The output you see is just a default for when there is no default backend
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/describe/describe.go#L2393

So, do we have to expose the port 80

  rules:
  - host: k8s-console.95.217.159.244.nip.io
    http:
      paths:
      - backend:
          serviceName: kubernetes-dashboard-nodeport
          servicePort: 80
        path: /
  tls:
  - hosts:
    - k8s-console.95.217.159.244.nip.io
    secretName: kubernetes-dashboard-certs

even if the application (kubernetes dashboard) starts on port 443/8443 - HTTPS ?

@cmoulliard You need create default-http-backend related deployment and service under kube-system namespace as mentioned in the comment lines from source line.
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/describe/describe.go#L2393

Was this page helpful?
0 / 5 - 0 ratings

Related issues

silasbw picture silasbw  ยท  3Comments

geek876 picture geek876  ยท  3Comments

yuyang0 picture yuyang0  ยท  3Comments

cabrinoob picture cabrinoob  ยท  3Comments

cehoffman picture cehoffman  ยท  3Comments