Tasks for Ingress-Nginx

TOC

Prerequisites

Install ingress-nginx

Max Connections

Max-Worker-Connections

Request Timeout

Configure request timeout

Session Affinity (Sticky Sessions)

Configure sticky sessions

Header Modification

actionlink
set header in requestproxy-set-header
remove header in requestset a empty header in request
set header in responseconfiguration-snippets with more-set-header directive
remove header in responsehide-headers

URL Rewrite

rewrite

HSTS (HTTP Strict Transport Security)

configure HSTS

Rate Limiting

config rate limiting

WAF

modsecurity

Forward-header control

x-forwarded-prefix-header

HTTPS

TLS re-encrypt and verify backend certificate

verify backend https certificate

TLS edge termination

backend protocol

Passthrough

ssl-passthrough

Default Certificate

use the following yaml to deploy an ingress-nginx with default certificate

apiVersion: ingress-nginx.alauda.io/v1
kind: IngressNginx
metadata:
  name: demo
spec:
  controller:
    extraArgs:
      default-ssl-certificate: $DEFAULT_CERT_NAMESPACE/$DEFAULT_CERT_NAME

please refer to default-ssl-certificate

Add Pod Annotation in IngressNginx

Add pod annotation