emptyDir
Last updated
Last updated
apiVersion: v1
kind: Pod
metadata:
name: fortune
spec:
containers:
- image: luksa/fortune
name: html-generator
volumeMounts: # 定义挂载点
- name: html # (必须)卷的名称
mountPath: /var/htdocs # (必须)挂载至容器中的位置
- image: nginx:alpine
name: web-server
volumeMounts:
- name: html
mountPath: /usr/share/nginx/html
readOnly: true
ports:
- containerPort: 80
protocol: TCP
volumes: # 定义卷
- name: html # (必须)卷的名称
emptyDir: # 创建的是emptyDir卷
medium: Memory # 默认为"",若指定为Memory,则为tmfs,即使用内存作为卷存储介质