Skip to content

Instantly share code, notes, and snippets.

@sneak
Created October 2, 2018 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sneak/d33cf88c4bb3299119573d998eac7581 to your computer and use it in GitHub Desktop.
Save sneak/d33cf88c4bb3299119573d998eac7581 to your computer and use it in GitHub Desktop.
multiple hostnames for single ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
traefik.ingress.kubernetes.io/redirect-permanent: "true"
traefik.ingress.kubernetes.io/redirect-regex: ^https://www.helloworld2.domain.de/(.*)
traefik.ingress.kubernetes.io/redirect-replacement: https://helloworld2.domain.de/$1
name: helloworld2
namespace: default
spec:
rules:
- host: helloworld2.domain.de
http:
paths:
- backend:
serviceName: helloworld
servicePort: 80
path: /
- host: www.helloworld2.domain.de
http:
paths:
- backend:
serviceName: helloworld
servicePort: 80
path: /
status:
loadBalancer: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment