0

Can we use single volume across multiple Nodes in read-only manner and that way save on the storage required for hosting Configuration in kubernetes. If yes then which is the best sutaible volume type for same?

Sagardevd
  • 121
  • 1
  • 1
  • 6
  • 1
    ConfigMaps are designed for your use case. Why not [volume mount a ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume) into a container? – Chin Huang Jan 04 '19 at 15:27

2 Answers2

0

Not sure what do you mean by single volume but, you can use persistentVolumeClaim which should be created with Access Modes ReadOnlyMany

  • ReadOnlyMany – the volume can be mounted read-only by many nodes

You need to keep in mind that not all Types of Persistent Volumes are available in that Access Mode

Crou
  • 10,232
  • 2
  • 26
  • 31
0

The best way to manage configuration in Kubernetes is by creating a ConfigMap objects and mounting them as volumes/folders into pods.

Mounting ConfigMap as volumes: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume

Good luck.

Ofir Makmal
  • 501
  • 2
  • 3