代码拉取完成,页面将自动刷新
apiVersion: v1
kind: Pod
metadata:
name: multi-container-pod
spec:
containers:
- command:
- /bin/sh
- -c
- sleep 60
image: nginx
name: sleep
volumeMounts:
- mountPath: /shared-folder
name: shared-folder
- image: nginx
name: nginx
volumeMounts:
- mountPath: /shared-folder
name: shared-folder
- mountPath: /mnt
name: my-annotations
readOnly: true
dnsPolicy: Default
initContainers:
- command:
- /bin/sh
- -c
- touch /shared-folder/tmp-file
- sleep 10
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
image: nginx
name: nginx-init
volumeMounts:
- mountPath: /shared-folder
name: shared-folder
restartPolicy: Always
volumes:
- emptyDir:
name: shared-folder
- downwardAPI:
defaultMode: 420
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.annotations
path: annotations
name: my-annotations
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。