Fixing ingress-nginx ConfigurationSnippet validations

Today I found myself needing to configure ingress-nginx. I needed to write a bit of nginx config to rewrite status codes for certain routes. Something like nginx.ingress.kubernetes.io&#x2F;configuration-snippet : | - location &#x2F;metrics { return 404; } I&#x27;ve done this many times in the past, but today I received the following error Error: UPGRADE FAILED: cannot patch "xyz" with kind…