Skip to content

Instantly share code, notes, and snippets.

@theofpa
Last active August 8, 2023 11:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theofpa/be7f87a6f056e2e0a8b4beaf932362da to your computer and use it in GitHub Desktop.
Save theofpa/be7f87a6f056e2e0a8b4beaf932362da to your computer and use it in GitHub Desktop.
An Istio ingress resource that uses ALB and header based auth, handy to serve Kubeflow traffic to non-humans
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]'
alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=180
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/certificate-arn: 'arn:aws:acm:eu-west-1:1234123xxx:certificate/66e23eea-39bc-45fa-67b7-xxx'
alb.ingress.kubernetes.io/conditions.istio-ingressgateway: '[{"Field":"http-header","HttpHeaderConfig":{"HttpHeaderName": "x-api-key", "Values":["aRandomStringxxx", "anotherRandomStringxxx"]}}]'
alb.ingress.kubernetes.io/actions.istio-ingressgateway: '{"Type":"forward","ForwardConfig":{"TargetGroups":[{"ServiceName":"istio-ingressgateway","ServicePort":"80","Weight":100}]}}'
kubernetes.io/ingress.class: alb
name: istio-ingress-api
namespace: istio-system
spec:
rules:
- http:
paths:
- backend:
service:
name: istio-ingressgateway
port:
number: 80
path: /
pathType: Prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment