alb.ingress.kubernetes.io

From wikieduonline
Revision as of 13:33, 5 August 2024 by Welcome (talk | contribs)
Jump to navigation Jump to search

alb.ingress.kubernetes.io
alb.ingress.kubernetes.io/scheme:     internet-facing | internal
alb.ingress.kubernetes.io/certificate-arn
alb.ingress.kubernetes.io/healthcheck-cidrs
alb.ingress.kubernetes.io/healthcheck-path
alb.ingress.kubernetes.io/inbound-cidrs
alb.ingress.kubernetes.io/listen-ports
alb.ingress.kubernetes.io/ssl-redirects
alb.ingress.kubernetes.io/success-codes
alb.ingress.kubernetes.io/backend-protocol
alb.ingress.kubernetes.io/wafv2-acl-arn


OK:

alb.ingress.kubernetes.io/load-balancer-attributes: routing.http.drop_invalid_header_fields.enabled=true


alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=600

Example

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: default
  name: ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/actions.response-503: >
      {"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"503","messageBody":"503 error text"}}
    alb.ingress.kubernetes.io/actions.redirect-to-eks: >
      {"type":"redirect","redirectConfig":{"host":"aws.amazon.com","path":"/eks/","port":"443","protocol":"HTTPS","query":"k=v","statusCode":"HTTP_302"}}
    alb.ingress.kubernetes.io/actions.forward-single-tg: >
      {"type":"forward","targetGroupARN": "arn-of-your-target-group"}
    alb.ingress.kubernetes.io/actions.forward-multiple-tg: >
      {"type":"forward","forwardConfig":{"targetGroups":[{"serviceName":"service-1","servicePort":"http","weight":20},{"serviceName":"service-2","servicePort":80,"weight":20},{"targetGroupARN":"arn-of-your-non-k8s-target-group","weight":60}],"targetGroupStickinessConfig":{"enabled":true,"durationSeconds":200}}}
spec:
  rules:
    - http:
        paths:
          - path: /503
            backend:
              serviceName: response-503
              servicePort: use-annotation
          - path: /eks
            backend:
              serviceName: redirect-to-eks
              servicePort: use-annotation
          - path: /path1
            backend:
              serviceName: forward-single-tg
              servicePort: use-annotation
          - path: /path2
            backend:
              serviceName: forward-multiple-tg
              servicePort: use-annotation

Related

See also

Advertising: