deploy nginx-ingress with large nginx config

deploy nginx-ingress with large nginx config

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

답변1

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.

관련 정보