160 lines
2.6 KiB
YAML
160 lines
2.6 KiB
YAML
|
# Minor modification from http://www.it20.info/2017/07/yelb-yet-another-sample-app/ for demo purposes
|
||
|
apiVersion: v1
|
||
|
kind: Namespace
|
||
|
metadata:
|
||
|
name: yelb
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: redis-server
|
||
|
labels:
|
||
|
app: redis-server
|
||
|
tier: cache
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
ports:
|
||
|
- port: 6379
|
||
|
selector:
|
||
|
app: redis-server
|
||
|
tier: cache
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: yelb-db
|
||
|
labels:
|
||
|
app: yelb-db
|
||
|
tier: backenddb
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
ports:
|
||
|
- port: 5432
|
||
|
selector:
|
||
|
app: yelb-db
|
||
|
tier: backenddb
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: yelb-appserver
|
||
|
labels:
|
||
|
app: yelb-appserver
|
||
|
tier: middletier
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
ports:
|
||
|
- port: 4567
|
||
|
selector:
|
||
|
app: yelb-appserver
|
||
|
tier: middletier
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: yelb-ui
|
||
|
labels:
|
||
|
app: yelb-ui
|
||
|
tier: frontend
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
type: LoadBalancer
|
||
|
ports:
|
||
|
- port: 80
|
||
|
protocol: TCP
|
||
|
targetPort: 80
|
||
|
selector:
|
||
|
app: yelb-ui
|
||
|
tier: frontend
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: yelb-ui
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: yelb-ui
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: yelb-ui
|
||
|
tier: frontend
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: yelb-ui
|
||
|
image: mreferre/yelb-ui:0.6
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: redis-server
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: redis-server
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: redis-server
|
||
|
tier: cache
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: redis-server
|
||
|
image: redis:4.0.2
|
||
|
ports:
|
||
|
- containerPort: 6379
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: yelb-db
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: yelb-db
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: yelb-db
|
||
|
tier: backenddb
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: yelb-db
|
||
|
image: mreferre/yelb-db:0.5
|
||
|
ports:
|
||
|
- containerPort: 5432
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: yelb-appserver
|
||
|
namespace: yelb
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: yelb-appserver
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: yelb-appserver
|
||
|
tier: middletier
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: yelb-appserver
|
||
|
image: mreferre/yelb-appserver:0.5
|
||
|
ports:
|
||
|
- containerPort: 4567
|