【问题标题】:Which are the best suitable volume types in kubernetes to store host configuration?Kubernetes 中哪些卷类型最适合存储主机配置?
【发布时间】:2019-01-04 06:32:04
【问题描述】:

我们能否以只读方式跨多个节点使用单个卷,这样可以节省在 kubernetes 中托管配置所需的存储空间。 如果是,那么哪个是最适合的音量类型?

【问题讨论】:

标签: kubernetes persistent-volumes


【解决方案1】:

不知道你所说的单卷是什么意思,但你可以使用persistentVolumeClaim,它应该用Access ModesReadOnlyMany创建

  • ReadOnlyMany – 卷可由多个节点以只读方式挂载

您需要记住,并非所有Types of Persistent Volumes 都在Access Mode 中可用

【讨论】:

    【解决方案2】:

    在 Kubernetes 中管理配置的最佳方式是创建 ConfigMap 对象并将它们作为卷/文件夹安装到 pod 中。

    将 ConfigMap 安装为卷: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume

    祝你好运。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-02-27
      • 2012-06-07
      • 2010-12-29
      • 2019-07-23
      • 2015-11-06
      • 2017-09-01
      • 2015-05-22
      相关资源
      最近更新 更多