first commit
This commit is contained in:
39
k8s/nginx-deployment.yaml
Normal file
39
k8s/nginx-deployment.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: nginx-config-volume
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
- name: assets
|
||||
mountPath: /usr/share/nginx/html/resources/staticfiles
|
||||
readOnly: true
|
||||
- name: media
|
||||
mountPath: /usr/share/nginx/html/resources/media
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: assets
|
||||
persistentVolumeClaim:
|
||||
claimName: assets
|
||||
- name: media
|
||||
persistentVolumeClaim:
|
||||
claimName: media
|
||||
- name: nginx-config-volume
|
||||
configMap:
|
||||
name: nginx-config
|
||||
Reference in New Issue
Block a user