46 lines
966 B
YAML
46 lines
966 B
YAML
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: todo-proxy-lab-pvc
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 100Mi
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: todo-proxy-lab
|
||
|
labels:
|
||
|
app: todo-proxy-lab
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: todo-proxy-lab
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: todo-proxy-lab
|
||
|
spec:
|
||
|
containers:
|
||
|
- image: nginx:1.17-alpine
|
||
|
name: nginx
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
name: http
|
||
|
volumeMounts:
|
||
|
- name: config
|
||
|
mountPath: "/etc/nginx/"
|
||
|
readOnly: true
|
||
|
- name: cache-volume
|
||
|
mountPath: /data/nginx/cache
|
||
|
volumes:
|
||
|
- name: config
|
||
|
configMap:
|
||
|
name: todo-proxy-lab-configmap
|
||
|
- name: cache-volume
|
||
|
persistentVolumeClaim:
|
||
|
claimName: todo-proxy-lab-pvc
|