57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
namespace: cloudnative-zone
|
|
name: web-deployment
|
|
labels:
|
|
app: web-cloudnative
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: web-cloudnative
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: web-cloudnative
|
|
spec:
|
|
containers:
|
|
- name: web-container
|
|
image: docker.io/nginx:alpine
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 80
|
|
name: cn-http
|
|
- containerPort: 443
|
|
name: cn-https
|
|
env:
|
|
volumeMounts:
|
|
- name: web-data-storage
|
|
mountPath: /usr/share/nginx/html
|
|
#- mountPath: /etc/ssl-dom
|
|
# readOnly: true
|
|
# name: web-certs
|
|
- mountPath: /etc/nginx/nginx.conf
|
|
readOnly: true
|
|
name: web-etc
|
|
subPath: nginx.conf
|
|
volumes:
|
|
- name: web-data-storage
|
|
persistentVolumeClaim:
|
|
claimName: web-data-vol
|
|
#claimName: web-data-claim
|
|
- name: web-etc
|
|
configMap:
|
|
name: web-etc
|
|
items:
|
|
- key: nginx.conf
|
|
path: nginx.conf
|
|
#- name: web-certs
|
|
# secret:
|
|
# secretName: repo-certs
|
|
# items:
|
|
# - key: tls.crt
|
|
# path: fullchain.pem
|
|
# - key: tls.key
|
|
# path: privkey.pem
|