kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch08/sleep/sleep-with-db-backup-mount.yaml

27 lines
512 B
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: sleep
labels:
kiamol: ch08
spec:
selector:
matchLabels:
app: sleep
template:
metadata:
labels:
app: sleep
spec:
containers:
- name: sleep
image: kiamol/ch03-sleep
volumeMounts:
- name: backup
mountPath: "/backup"
readOnly: true
volumes:
- name: backup
persistentVolumeClaim:
claimName: todo-db-backup-pvc