K8S教程(7)YAML配置清单之挂载共享存储
啊啊
apiVersion: v1 kind: Pod metadata: name: pod-mutil spec: initContainers: - name: download-code image: oldxu3957/tools command: ["/bin/bash", "-c", "wget -O /data/index.html https://linux.oldxu.net/index.html"] volumeMounts: - name: code-file mountPath: /data containers: - name: web image: nginx:1.16 volumeMounts: - name: code-file mountPath: /usr/share/nginx/html # 卷定义好了 volumes: - name: code-file emptyDir: medium: Memory sizeLimit: 10Mi
版权声明:本文章版权归数据库运维网(www.ywdba.cn)所有。如需引用本站内容,请注明来源及作者。
评论