kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch13/sleep.yaml

31 lines
643 B
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: sleep
labels:
kiamol: ch13
spec:
selector:
matchLabels:
app: sleep
template:
metadata:
labels:
app: sleep
spec:
containers:
- name: sleep
image: kiamol/ch03-sleep
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers