-
-
Save raino007/794b240a071756fc146d11dc588eb496 to your computer and use it in GitHub Desktop.
ingress.yml
This file contains 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: | |
namespace: default | |
name: 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/subnets: public_subnet_one,public_subnet_two | |
alb.ingress.kubernetes.io/certificate-arn: acm_ssl_arn | |
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]' | |
alb.ingress.kubernetes.io/group.name: app | |
alb.ingress.kubernetes.io/actions.ssl-redirect: >- | |
{ | |
"Type": "redirect", | |
"RedirectConfig": { | |
"Protocol": "HTTPS", | |
"Port": "443", | |
"Host": "#{host}", | |
"Path": "/#{path}", | |
"Query": "#{query}", | |
"StatusCode": "HTTP_301" | |
} | |
} | |
spec: | |
rules: | |
- host: app.example.com ##Replace the host value with your desired custom domain | |
http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: ssl-redirect | |
port: | |
name: use-annotation | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: example ##Replace service name example with SVC that you created during the sample application deployment | |
port: | |
number: 80 ##Replace 80 with application port number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment