Git Product home page Git Product logo

custom-nginx-ingress-errors's Introduction

custom-nginx-ingress-errors

Assets to build a container to provide a custom default backend to the nginx-ingress Kubernetes Ingress controller

404 Screenshot

Editing Error Pages

The container has a set of error HTML and JSON files that are returned based on the error code. These files are stored in the www/ directory and are copied to the /www/ directory in the container.

  1. Fork this repo, modify the error pages as you see fit.
  2. Connect to Docker Hub/Quay.io to build an image you have access to.
  3. Modify the k8s-deployment.yaml file to point to your custom built image.

Deploying a custom default-backend for Nginx Ingress

Note: This is for the Kubernetes Nginx Ingress, not the one made by Nginx. If you haven't deployed it yet, here ya go: https://kubernetes.github.io/ingress-nginx/deploy/

These instructions assume that you deployed this in the default ingress-nginx namespace.

  1. Modify the k8s-deployment.yaml file to point to your custom built image, or use it as is for some snazzy error pages
  2. Deploy to the Kubernetes cluster: kubectl apply -f k8s-deployment.yaml
  3. Modify the ingress-nginx/ingress-nginx-controller Deployment and set the value of the --default-backend-service arg flag to the name of the newly created error backend, which should be ingress-nginx/nginx-errors by default.
  4. Edit the ingress-nginx/ingress-nginx-controller ConfigMap and add the key:value pair of custom-http-errors: '404,500,503'
  5. ??????
  6. PROFIT!!!!1

custom-nginx-ingress-errors's People

Contributors

kenmoini avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.