23
loading...
This website collects cookies to deliver better user experience
containers:
- name: haproxy-ingress
image: haproxytech/kubernetes-ingress
request path
and host name
, and route the traffic to a number of backends
such services
.apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web-ingress
labels:
name: web-ingress
# proxy rules as known from haproxy wrapped in annotations
annotations:
haproxy.org/allowlist: "192.168.1.0/24, 192.168.2.100"
haproxy.org/ssl-redirect: "true"
haproxy.org/ssl-certificate: "default/my-tls-object"
haproxy.org/ssl-redirect-code: "301"
haproxy.org/rate-limit-requests: 10
haproxy.org/rate-limit-period: "1m"
haproxy.org/load-balance: "leastconn"
haproxy.org/cookie-persistence: "JSESSIONID"
haproxy.org/cors-allow-methods: "GET, POST"
haproxy.org/path-rewrite: /foo/(.*) /\1
haproxy.org/request-set-header: |
Ingress-ID abcd123
Another-Header 12345
haproxy.org/response-set-header: |
Cache-Control "no-store,no-cache,private"
Strict-Transport-Security "max-age=31536000"
# define what backend should be matched
spec:
rules:
- host: <your-domain>
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: app
port:
number: 80
configmap
. That allows to encapsulate and decouple common rules.apiVersion: v1
kind: ConfigMap
metadata:
name: kubernetes-ingress
namespace: default
# create rules for the default namespace
data:
allowlist: "192.168.1.0/24, 192.168.2.100"
global-config-snippet: |
ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11
ssl-default-bind-ciphers TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256
tune.ssl.default-dh-param 2048
tune.bufsize 32768
ssl-redirect: "true"
ssl-certificate: "default/my-tls-object"
ssl-redirect-code: "301"
timeout-connect: 5s
timeout-http-request: 5s
timeout-http-keep-alive: 5s