mirror of
https://github.com/Telecominfraproject/wlan-toolsmith.git
synced 2025-11-01 19:37:57 +00:00
IMPORTANT
clone of: https://github.com/kenmoini/custom-nginx-ingress-errors with slight modifications
used dockerfile was built manually
custom-nginx-ingress-errors
Assets to build a container to provide a custom default backend to the nginx-ingress Kubernetes Ingress controller
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.
- Fork this repo, modify the error pages as you see fit.
- Connect to Docker Hub/Quay.io to build an image you have access to.
- Modify the
k8s-deployment.yamlfile 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.
- Modify the
k8s-deployment.yamlfile to point to your custom built image, or use it as is for some snazzy error pages - Deploy to the Kubernetes cluster:
kubectl apply -f k8s-deployment.yaml - Modify the
ingress-nginx/ingress-nginx-controllerDeployment and set the value of the--default-backend-serviceflag to the name of the newly created error backend, which should beingress-nginx/nginx-errorsby default. - Edit the
ingress-nginx/nginx-configurationConfigMap and add the key:value pair of"custom-http-errors": "404,500,503" - ??????
- PROFIT!!!!1
