Skip to content

Instantly share code, notes, and snippets.

@jpweber
Created August 12, 2019 21:53
Show Gist options
  • Save jpweber/8b8b0774bf93f89c71d630ceb16386ef to your computer and use it in GitHub Desktop.
Save jpweber/8b8b0774bf93f89c71d630ceb16386ef to your computer and use it in GitHub Desktop.
# Below example would be for something externally available
# at http://app1.example.com/ handes URIs of /, /foo and /bar
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: http-service-test
labels:
app: http-service-test
spec:
rules:
- host: app1.example.com # only handle traffic that was sent to this fqdn
http:
paths:
- path: / # path of the URI to route to the following service
backend:
serviceName: http-service-test1 # name of service to route traffic to
servicePort: 8080 # port of that service to send traffic to
- path: /foo # path of the URI to route to the following service
backend:
serviceName: http-service-test2 # name of service to route traffic to
servicePort: 8080 # port of that service to send traffic to
- path: /bar # path of the URI to route to the following service
backend:
serviceName: http-service-test3 # name of service to route traffic to
servicePort: 8080 # port of that service to send traffic to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment