AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
[TOC] # Volume `Volume`支持很多种类型的文件系统,具体使用可以翻阅官方示例文档[github 示例文档](https://github.com/kubernetes/examples/) 我这里就只示例几种常见的类型: (以后遇到什么类型,我会再更新上来) ### emptyDir 当出于任何原因从节点中删除 Pod 时,`emptyDir`中的数据将被永久删除。 ~~~ apiVersion: v1 kind: Pod metadata: name: test-pd spec: containers: - image: k8s.gcr.io/test-webserver name: test-container volumeMounts: - mountPath: /cache name: cache-volume volumes: - name: cache-volume emptyDir: {} ~~~ ### hostPath ~~~ apiVersion: v1 kind: Pod metadata: name: test-pd spec: containers: - image: k8s.gcr.io/test-webserver name: test-container volumeMounts: - mountPath: /test-pd name: test-volume volumes: - name: test-volume hostPath: path: /data type: Directory ~~~ `type`字段还支持很多种类型,可以查阅官方文档