Skip to content

Instantly share code, notes, and snippets.

@iflowfor8hours
Created May 8, 2017 15:36
Show Gist options
  • Save iflowfor8hours/f751c0d72d24f7c852c21d93c8aa5e6e to your computer and use it in GitHub Desktop.
Save iflowfor8hours/f751c0d72d24f7c852c21d93c8aa5e6e to your computer and use it in GitHub Desktop.
external services using k8s and traefik
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: testlanding
namespace: landingpages
annotations:
kubernetes.io/ingress.class: traefik
traefik.frontend.passHostHeader: "false"
spec:
rules:
- host: wwwstorefrontnext.dev.com # This is URI where the request lands on http, should redir to https.
http:
paths:
- path: /
backend:
serviceName: staticbackend
servicePort: 80
---
apiVersion: v1
kind: Service
metadata:
name: staticbackend
namespace: landingpages
spec:
ports:
- name: http
port: 80
type: ExternalName
externalName: www.landingtest.com # This expects the host header to match something internal, I need to set it before landing here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment