part2 is done (with volumes and a different index for each service)

This commit is contained in:
2025-02-27 07:47:22 -05:00
parent cc358ecf93
commit 8671147c79
6 changed files with 160 additions and 5 deletions

42
p2/confs/app2.yaml Normal file
View File

@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: app2-deployment
labels:
app: app2
spec:
replicas: 3
selector:
matchLabels:
app: app2
template:
metadata:
labels:
app: app2
spec:
containers:
- name: app2
image: nginx:1.14.2
volumeMounts:
- name: indexes
mountPath: /usr/share/nginx/html/index.html
subPath: app2
volumes:
- name: indexes
configMap:
name: indexes
items:
- key: app2
path: app2
---
apiVersion: v1
kind: Service
metadata:
name: app2-service
spec:
type: NodePort
selector:
app: app2
ports:
- port: 80
targetPort: 80