Created
August 22, 2024 04:43
-
-
Save ragul28/49aa1d8aee55a8ec65ffe45eb6fe992b to your computer and use it in GitHub Desktop.
AWS LB controller ingress manifest covering all basics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: dev-ingress | |
annotations: | |
kubernetes.io/ingress.class: alb | |
alb.ingress.kubernetes.io/scheme: internet-facing | |
alb.ingress.kubernetes.io/target-type: ip | |
alb.ingress.kubernetes.io/group.name: example-dev | |
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP | |
alb.ingress.kubernetes.io/healthcheck-port: traffic-port | |
alb.ingress.kubernetes.io/healthcheck-interval-seconds: "60" | |
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]' | |
alb.ingress.kubernetes.io/ssl-redirect: '443' | |
alb.ingress.kubernetes.io/certificate-arn: "ADD ACM ARN" | |
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}' | |
alb.ingress.kubernetes.io/actions.redirect-to-nwww: '{"Type":"redirect","RedirectConfig":{"Host":"asgard.digital","Port":"443","Protocol":"HTTPS","StatusCode":"HTTP_302"}}' | |
spec: | |
rules: | |
- host: www.example.com | |
http: | |
paths: | |
- backend: | |
service: | |
name: redirect-to-nwww | |
port: | |
name: use-annotation | |
pathType: Prefix | |
path: / | |
- host: example.com | |
http: | |
paths: | |
- backend: | |
service: | |
name: landing-page | |
port: | |
number: 80 | |
pathType: Prefix | |
path: / | |
- backend: | |
service: | |
name: api-gateway | |
port: | |
number: 80 | |
pathType: Prefix | |
path: /api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment