Skip to content

Implementation of a custom default backend for Nginx Ingress Controller

License

Notifications You must be signed in to change notification settings

juanfbl9307/custom-default-backend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Default Backend for NGINX Ingress Controller

Customize the default backend for an NGINX Ingress Controller on your kubernetes cluster. A single Docker image with an NGINX server that handles most status codes.

LIVE Preview for a 404 status code.

Installation via Helm

You can use the defaultBackend property of the ingress-nginx helm chart like this:

defaultBackend:
  enabled: true
  image:
    # Or your own forked one...
    repository: dvdblk/custom-default-backend
    tag: "latest"
    pullPolicy: Always
  port: 8080

HTML Customization

Fork this repository and edit the HTML inside the content/ directory if you want some CSS / text customization.

If you wish to have a different HTML error page per status code you can omit the ssi part and set up the error pages (e.g. content/404.html, content/500.html) like this:

# default.conf

server {
  # ...

  error_page 400 /404.html;
  location = /404.html {
    internal;
  }

  error_page 500 /500.html;
  location = /500.html {
    internal;
  }

  # ...
}

About

Implementation of a custom default backend for Nginx Ingress Controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 79.6%
  • Dockerfile 20.4%