Permalink
Fetching contributors…
Cannot retrieve contributors at this time
106 lines (105 sloc) 1.8 KB
apiVersion: v1
kind: Service
metadata:
name: name-service
spec:
selector:
app: name-pod
ports:
- port: 8080
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: name-rs
spec:
replicas: 1
selector:
matchLabels:
app: name-pod
template:
metadata:
labels:
app: name-pod
spec:
containers:
- name: name
image: arungupta/name-service:latest
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: greeter-service
spec:
selector:
app: greeter-pod
ports:
- port: 8080
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: greeter-rs
spec:
replicas: 1
selector:
matchLabels:
app: greeter-pod
template:
metadata:
labels:
app: greeter-pod
spec:
containers:
- name: name
image: arungupta/greeter-service:latest
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: webapp-service
spec:
selector:
app: webapp-pod
ports:
- name: web
port: 80
targetPort: 8080
type: LoadBalancer
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: webapp-rs
spec:
replicas: 1
selector:
matchLabels:
app: webapp-pod
template:
metadata:
labels:
app: webapp-pod
spec:
containers:
- name: webapp-pod
image: arungupta/webapp-service:latest
env:
- name: NAME_SERVICE_HOST
value: name-service
- name: NAME_SERVICE_PORT
value: "8080"
- name: NAME_SERVICE_PATH
value: /
- name: GREETER_SERVICE_HOST
value: greeter-service
- name: GREETER_SERVICE_PORT
value: "8080"
- name: GREETER_SERVICE_PATH
value: /
ports:
- containerPort: 8080