kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch05/lab/solution/web.yaml

40 lines
815 B
YAML
Raw Normal View History

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: todo-web-lab-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-web-lab
spec:
selector:
matchLabels:
app: todo-web-lab
template:
metadata:
labels:
app: todo-web-lab
spec:
containers:
- name: web
image: kiamol/ch04-todo-list
env:
- name: Database__Provider
value: Sqlite
- name: ConnectionStrings__ToDoDb
value: "Filename=/data/todo-list-lab.db"
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: todo-web-lab-pvc