31 lines
619 B
YAML
31 lines
619 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nginx4
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: nginx4
|
|
replicas: 3
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nginx4
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:alpine
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: nginx-html-volume
|
|
mountPath: /usr/share/nginx/html
|
|
volumes:
|
|
- name: nginx-html-volume
|
|
configMap:
|
|
name: nginx-html-config4
|
|
items:
|
|
- key: index.html
|
|
path: index.html
|
|
|