39 lines
720 B
YAML
39 lines
720 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: angels
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: angels
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: angels
|
|
spec:
|
|
volumes:
|
|
- name: html-content
|
|
configMap:
|
|
name: angels-index
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:alpine
|
|
ports:
|
|
- containerPort: 82
|
|
volumeMounts:
|
|
- name: html-content
|
|
mountPath: /usr/share/nginx/html/index.html
|
|
subPath: index.html
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: angels
|
|
spec:
|
|
type: LoadBalancer
|
|
selector:
|
|
app: angels
|
|
ports:
|
|
- port: 82
|
|
targetPort: 82 |