This installs ingress-nginx which is the Kubernetes hosted ingress controller using nginx, not to be confused with nginx-ingress, which is the ingress controller using nginx that is hosted by nginx itself.
![Screenshot 2024-06-21 at 16 57 53](https://private-user-images.githubusercontent.com/2389292/341804035-52d2cc0b-1dd5-4859-8b7e-a44a4da076fe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjEzNjMsIm5iZiI6MTczOTUyMTA2MywicGF0aCI6Ii8yMzg5MjkyLzM0MTgwNDAzNS01MmQyY2MwYi0xZGQ1LTQ4NTktOGI3ZS1hNDRhNGRhMDc2ZmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMDgxNzQzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjRhZjQ0MDA0YTAyNDQyNmM1YThiY2JlNTdmZGY5Y2IxNGEzMWY0MjIxNmQ1OTIzNjUzNTEzYjJjZGMyZGEyMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.YpHgR2PHcj50k0xe4CtCPmkUeaH3ScERY1EunBE3JBg)
We pass in values to helm chart to:
- use 2 ingress replicas, for increasing availability during high traffic times
- ensure we get the real IP in the logs, and not the cluster network IPs using:
controller.config.enable-reali-ip=true
controller.config.use-forwarded-headers=true
controller.service.externalTrafficPolicy='Local'
- use
TZ
env var to use your own time zone via thecontroller.extraEnvs
parameter - allow snippet annotations in individual ingress reosurces using
controller.allowSnippetAnnotations=true
- enable metrics via a serviceMonitor via
controller.metrics.serviceMonitor.enabled=true
- enabled ModSecurity as a WAF (Web Application Firewall). Check out this blog post for some pointers. From that post:
And you can further tweak the configuration at the Ingress level, even fully disable it, using the nginx.ingress.kubernetes.io/modsecurity-snippet annotation. For example, to disable the WAF in a specific Ingress:
nginx.ingress.kubernetes.io/modsecurity-snippet: |
SecRuleEngine Off
Since ModSecurity might not keep going (because F5/Nginx no longer support it), it's important to keep note of Coraza SecLang engine.
We also utilize a few dashboards via Grafana to get some high level overview of what's going on. You can view these dashboards in the prometheus/dashbaords directory, but here's a sample: