0

I have an nginx-ingress controller that I has multiple hosts connected to it. I have built the config as a ConfigMap, but when I attempt to deploy it, I keep getting and error message that says the config is to large. If creating a ConfigMap is not an option then, what options do I have to deploy the ingress with my large nginx config?

The ConfigMap "nginx-conf" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

zerobit
  • 1
  • 1
  • I presume this is a dupe of [your other question](https://serverfault.com/questions/1117702/build-custom-nginx-ingress-image)? – mdaniel Dec 10 '22 at 04:52

1 Answers1

0

This is because ConfigMaps have a maximum size limit of 256KB, and your nginx config is larger than this limit.

Use a separate ConfigMap for each part of the nginx config. If splitting up the nginx config into multiple key-value pairs is not practical, you can create multiple ConfigMaps, each containing a different part of the nginx config. You can then reference these ConfigMaps in your deployment manifest, and they will be combined to form the complete nginx config when the nginx-ingress controller is deployed.