Defining a fallback service for Kubernetes ingress

0 votes

How do I present a “website down” message to the visitors if all the pods are crashed?

Right now a page appears with the error message “default backend-404”

I’ve tried a few things but nothing is working.

I’ve tried something like this

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example-ingress
spec:
  backend:
    serviceName: website-down-service
    servicePort: 80
  rules:
    - host: example.com
      http:
        paths:
          - path: /
            backend:
              serviceName: example-service
              servicePort: 80

What am I supposed to do?

Sep 11, 2018 in Kubernetes by lina
• 8,100 points
144 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
For the Nginx Ingress Controller there is a flag --default-backend-service, which currently points to the service showing the "default backend - 404" message. Just replace it with the service you want.
answered Sep 11, 2018 by Kalgi
• 35,800 points

Related Questions In Kubernetes

0 votes
1 answer

How can I access a service installed on Kubernetes from anywhere?

I have followed the link which you have ...READ MORE

answered Jul 23, 2018 in Kubernetes by Atul
• 10,200 points
73 views
0 votes
1 answer

Forcing ssl for Kubernetes Ingress on GKE

https://github.com/kubernetes/ingress-gce#frontend-https If you want to block http, you ...READ MORE

answered Sep 6, 2018 in Kubernetes by ajs3033
• 7,040 points
704 views
0 votes
1 answer

Kubernetes Ingress controllers for wildcard url mapping

If you use the stock controllers you ...READ MORE

answered Sep 10, 2018 in Kubernetes by Kalgi
• 35,800 points
460 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
488 views
+3 votes
1 answer
0 votes
2 answers

single point of entry for multiple services in kubernetes ingress

I tried having something similar too. Deployment apiVersion: extensions/v1beta1 kind: ...READ MORE

answered Sep 7, 2018 in Kubernetes by Hannah
• 14,080 points
44 views
0 votes
1 answer

ingress for kubernetes wordpress

You can configure your ingress to forward ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 35,800 points
144 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.