How edit html pages for Ingress-nginx default backend on kubenetes

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:

This is the nginx docs I am following,

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

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.


Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Please check my example gist which eliminates need of building own image

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:

Hope that this helps! Regards, Bobby