kubernetes-guide/codeblock/containerization/mount-tz.yaml

29 lines
531 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
replicas: 1
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
containers:
- name: app
image: app
volumeMounts:
# highlight-start
- name: tz
mountPath: /etc/localtime
# highlight-end
volumes:
# highlight-start
- name: tz
hostPath:
path: /etc/localtime
# highlight-end