By Daxcor
I have installed nginx-ingress via the 1-click process here on DO to my cluster. Everything is working flawlessly. In the helm chart values.yaml file there is an option to enable a default backend pod/image. This works as expected. What I can’t figure out is how to edit the html files inside the prebuilt image. For example 404.htm simply says “404 error” I know I can create my own custom backend image for this purpose but I am trying to stay with the helm chart resources as provided. Here are the references to what I am working from:
https://marketplace.digitalocean.com/apps/nginx-ingress-controller
This is the nginx docs I am following,
https://kubernetes.github.io/ingress-nginx/user-guide/custom-errors/
I have tried to exec into the pod but there seems to be no shell available for me to look around inside the image. I can’t find any git repo for the image so I don’t know what’s in side. The image spec’ed is k8s.gcr.io/defaultbackend-amd64
Any thoughts, or pointers to documentation on how to do this would be appreciated. I have posted this question on slack and at the git repo issues with no viable answers.
thanks.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
What you could do is build your own image and change the www directory with your custom HTML error files.
You could take a look at this open-source example here:
https://github.com/kenmoini/custom-nginx-ingress-errors
Hope that this helps! Regards, Bobby
Please check my example gist which eliminates need of building own image https://gist.github.com/elmariofredo/6f99144f448c3b1f271c67069e6665bb
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.