Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (94 sloc) 1.7 KB
# Bikes deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: bikes-deploy
spec:
replicas: 2
selector:
matchLabels:
app: bikes
template:
metadata:
labels:
app: bikes
spec:
containers:
- name: myapp
image: vplauzon/get-started:part2-no-redis
env:
- name: NAME
value: bikes
ports:
- containerPort: 80
---
# Bikes Service
apiVersion: v1
kind: Service
metadata:
name: bikes-svc
spec:
type: ClusterIP
ports:
- port: 80
selector:
app: bikes
---
# Cars deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: cars-deploy
spec:
replicas: 2
selector:
matchLabels:
app: cars
template:
metadata:
labels:
app: cars
spec:
containers:
- name: myapp
image: vplauzon/get-started:part2-no-redis
env:
- name: NAME
value: cars
ports:
- containerPort: 80
---
# Cars Service
apiVersion: v1
kind: Service
metadata:
name: cars-svc
spec:
type: ClusterIP
ports:
- port: 80
selector:
app: cars
---
# Domain name overload Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: domain-name-overload-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: bikes.eastus2.cloudapp.azure.com
http:
paths:
- backend:
serviceName: bikes-svc
servicePort: 80
- host: cars.eastus2.cloudapp.azure.com
http:
paths:
- backend:
serviceName: cars-svc
servicePort: 80