Skip to content

Instantly share code, notes, and snippets.

@neilkuan
Created November 27, 2020 05:16
Show Gist options
  • Select an option

  • Save neilkuan/adf20b1b5f11f5e295ee33dbf4bc56bf to your computer and use it in GitHub Desktop.

Select an option

Save neilkuan/adf20b1b5f11f5e295ee33dbf4bc56bf to your computer and use it in GitHub Desktop.
ingress-sample.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
namespace: vnins
name: ingress-gateway
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig":{"Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:ap-southeast-1:012345678912:certificate/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80},{"HTTPS":443}]'
spec:
rules:
- host: backend.example.com
http:
paths:
- path: /*
backend:
serviceName: ssl-redirect
servicePort: use-annotation
- path: /*
backend:
serviceName: service-gateway
servicePort: 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment