43 lines
740 B
YAML
43 lines
740 B
YAML
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
|