You can find the official Installation guides here.
/healthz, /metrics and FriendsWith this NGINX server block snippet you can make sure that these endpoints (you can extend the list), can't be accessed from externally.
location ~ ^/(healthz|metrics|readiness) {
deny all;
return 404;
}
If you want to apply the server-snippet config option globally, you would add it to your Ingress NGINX Helm chart values like this:
controller:
config:
server-snippet: |
location ~ ^/(healthz|metrics|readiness) {
deny all;
return 404;
}
When not using the Helm chart you would need to enable (Example) and add the option to it, example:
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-configuration
data:
server-snippet: |
location ~ ^/(healthz|metrics|readiness) {
deny all;
return 404;
}
::