part2 is done (with volumes and a different index for each service)
This commit is contained in:
42
p2/confs/app3.yaml
Normal file
42
p2/confs/app3.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: app3-deployment
|
||||
labels:
|
||||
app: app3
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: app3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: app3
|
||||
spec:
|
||||
containers:
|
||||
- name: app3
|
||||
image: nginx:1.14.2
|
||||
volumeMounts:
|
||||
- name: indexes
|
||||
mountPath: /usr/share/nginx/html/index.html
|
||||
subPath: app3
|
||||
volumes:
|
||||
- name: indexes
|
||||
configMap:
|
||||
name: indexes
|
||||
items:
|
||||
- key: app3
|
||||
path: app3
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: app3-service
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: app3
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
Reference in New Issue
Block a user