title
Kubernetes ConfigMap and Secret as Kubernetes Volumes | Demo
description
Demo of using ConfigMap and Secret as Kubernetes Volumes | Kubernetes ConfigMap | Kubernetes Secrets | Kubernetes Volumes
► Subscribe To Me On Youtube: https://bit.ly/2z5rvTV
ConfigMap and Secret components are usually used for creating individual values, which are passed as environment variables in the pod configuration.
But ConfigMap and Secret are also volume types, which people don't realize in the beginning. Using them as volumes is actually a common requirement, e.g. think of applications that take configuration files as parameter on startup. Like prometheus, elastic search or your own java application taking a properties file or certificate file. The question is how to pass these config files to Kubernetes Pods?
In this video I show you how to create these configMap and secret volumes and how to use them in pods. I give you some real-life use cases and show you the syntax of using volumes in a pod configuration.
► Reference to YAML Configs: https://gitlab.com/nanuchi/kubernetes-tutorial-series-youtube/-/tree/master/configmap-and-secret-volumes
► Kubernetes Volumes Explained: https://youtu.be/0swOh5C3OVM
▬▬▬▬▬▬ T I M E S T A M P S
0:00 - Intro
0:13 - Configuration Files usages in pods
1:13 - ConfigMap and Secret creating individual values (key-value pairs) for env variables
2:40 - ConfigMap and Secret creating files for mounting them into the pod
14:44 - Summary
-------------------------------------------------------------------------------------------------------
Full Kubernetes and Docker tutorial ► https://bit.ly/2YGeRp9
DevOps Tools, like Ansible ► https://bit.ly/2W9UEq6
Complete K8s Application Setup ► https://youtu.be/EQNO_kM96Mo
Kubernetes Components explained ► https://www.youtube.com/watch?v=Krpb44XR0bk&t=364s
For any questions/issues/feedback, please leave me a comment and I will get back to you as soon as possible. Also please let me know what you want to learn about Docker & Kubernetes or another technology.
#kubernetes #kubernetestutorial #devops #techworldwithnana
-------------------------------------------------------------------------------------------------------
▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬
Join private Facebook group ► https://bit.ly/32UVSZP
Don't forget to subscribe ► https://bit.ly/3mO4jxT
DEV ► https://bit.ly/3h2fqiO
INSTAGRAM ► https://bit.ly/2F3LXYJ
TWITTER ► https://bit.ly/3i54PUB
LINKEDIN ► https://bit.ly/3hWOLVT
Legal Notice:
Kubernetes and the Kubernetes logo are trademarks or registered trademarks of The Linux Foundation in the United States and/or other countries. The Linux Foundation and other parties may also have trademark rights in other terms used herein. This video is not accredited, certified, affiliated with, nor endorsed by Kubernetes or The Linux Foundation.
detail
{'title': 'Kubernetes ConfigMap and Secret as Kubernetes Volumes | Demo', 'heatmap': [{'end': 133.147, 'start': 79.659, 'weight': 0.74}, {'end': 164.944, 'start': 139.177, 'weight': 0.729}, {'end': 581.922, 'start': 567.642, 'weight': 0.724}], 'summary': 'Learn about managing kubernetes configurations and secrets, including syntax for pod configuration and mounting files into a mosquito pod using config maps and secrets. also, explore adding volumes to pod configurations and controlling access to specific volumes using configmap and secret components.', 'chapters': [{'end': 511.077, 'segs': [{'end': 28.606, 'src': 'embed', 'start': 0.329, 'weight': 0, 'content': [{'end': 6.173, 'text': 'In this video, I will show you how to create config map and secret volumes and how to use them in parts.', 'start': 0.329, 'duration': 5.844}, {'end': 12.676, 'text': "I'm going to give you some real life use cases and show you the syntax of using volumes in a pod configuration.", 'start': 6.513, 'duration': 6.163}, {'end': 24.143, 'text': 'Think of applications that take configuration files as parameter when they start, like Prometheus, Elasticsearch, Mosquito Message Broker,', 'start': 13.417, 'duration': 10.726}, {'end': 28.606, 'text': 'NGINX or your own JavaScript or Java application that has properties files.', 'start': 24.143, 'duration': 4.463}], 'summary': 'Demonstrating the creation and usage of config map and secret volumes in kubernetes pods for various applications.', 'duration': 28.277, 'max_score': 0.329, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU329.jpg'}, {'end': 133.147, 'src': 'heatmap', 'start': 79.659, 'weight': 0.74, 'content': [{'end': 85.762, 'text': 'you know they are used for external configuration of individual values like this.', 'start': 79.659, 'duration': 6.103}, {'end': 89.365, 'text': 'And you can check out that video right here.', 'start': 87.283, 'duration': 2.082}, {'end': 96.648, 'text': 'So this is a MongoDB config map that has one key value pair, which is database host.', 'start': 89.985, 'duration': 6.663}, {'end': 103.251, 'text': 'And then you have secret for MongoDB as well with username and password key value pairs.', 'start': 97.049, 'duration': 6.202}, {'end': 110.715, 'text': 'Now note these are individual values and the way we use that in the pod configuration was like this.', 'start': 103.652, 'duration': 7.063}, {'end': 121.86, 'text': 'So this is a container where Mungo Express would start and the Mungo Express can reference these values, this individual key value pairs like this.', 'start': 111.914, 'duration': 9.946}, {'end': 133.147, 'text': 'So these individual values are used as values for the environmental variables that configure Mungo Express application in this case.', 'start': 122.28, 'duration': 10.867}], 'summary': 'Mongodb config map and secret are used for pod configuration with individual key value pairs for environmental variables.', 'duration': 53.488, 'max_score': 79.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU79659.jpg'}, {'end': 164.944, 'src': 'heatmap', 'start': 139.177, 'weight': 0.729, 'content': [{'end': 148.12, 'text': 'referencing the name of the secret and the key inside the secret, and the same way we use the config map.', 'start': 139.177, 'duration': 8.943}, {'end': 152.582, 'text': 'So this is one specific use case of config maps and secrets.', 'start': 148.48, 'duration': 4.102}, {'end': 159.124, 'text': 'However, these are individual values and not files that application in the pod container can read.', 'start': 153.002, 'duration': 6.122}, {'end': 164.944, 'text': 'So with config mapping secret you can create individual key value pairs,', 'start': 160.802, 'duration': 4.142}], 'summary': 'Config maps and secrets create individual key value pairs for applications in pod containers.', 'duration': 25.767, 'max_score': 139.177, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU139177.jpg'}, {'end': 283.73, 'src': 'embed', 'start': 259.909, 'weight': 3, 'content': [{'end': 267.417, 'text': 'has a configuration file where you can configure different stuff, like what ports to open, whether to secure it or not.', 'start': 259.909, 'duration': 7.508}, {'end': 277.525, 'text': 'Mosquito also takes a passwords file working configure all the authentication or you can also override the certificate files of mosquito.', 'start': 267.897, 'duration': 9.628}, {'end': 283.73, 'text': "And so we're going to create a config file and the secret file for mosquito pod.", 'start': 278.225, 'duration': 5.505}], 'summary': 'Mosquito can be configured with a file for ports, security, authentication, and certificates.', 'duration': 23.821, 'max_score': 259.909, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU259909.jpg'}, {'end': 485.624, 'src': 'embed', 'start': 442.137, 'weight': 4, 'content': [{'end': 446.778, 'text': 'you have to create them so they have to be in the cluster when the pod starts.', 'start': 442.137, 'duration': 4.641}, {'end': 454.3, 'text': 'Otherwise you will get errors that the config map or secret component can be found.', 'start': 447.938, 'duration': 6.362}, {'end': 456.56, 'text': "So let's actually go ahead and create this, too.", 'start': 454.62, 'duration': 1.94}, {'end': 467.151, 'text': 'and secret.', 'start': 466.09, 'duration': 1.061}, {'end': 471.934, 'text': 'And we can actually check these are components.', 'start': 468.872, 'duration': 3.062}, {'end': 475.597, 'text': 'Like this gets secret.', 'start': 473.415, 'duration': 2.182}, {'end': 485.624, 'text': 'And you get config map will give you mosquito config file and I have another one in the cluster.', 'start': 477.538, 'duration': 8.086}], 'summary': 'Create components in cluster to avoid errors. check components like secret and config map.', 'duration': 43.487, 'max_score': 442.137, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU442137.jpg'}], 'start': 0.329, 'title': 'Managing kubernetes configurations and secrets', 'summary': 'Covers the usage of config map and secret volumes in kubernetes, with real-life use cases and syntax for pod configuration. it also includes managing configurations and secrets in mosquito, defining files and client certificates, and mounting files into a mosquito pod using config maps and secrets.', 'chapters': [{'end': 179.47, 'start': 0.329, 'title': 'Kubernetes: config map and secret volumes', 'summary': 'Explains how to use config map and secret volumes in kubernetes, providing real-life use cases and syntax for using volumes in a pod configuration, with examples including applications like prometheus, elasticsearch, mosquito message broker, and nginx, as well as the creation of individual key value pairs and files for mounting into pods.', 'duration': 179.141, 'highlights': ['The chapter explains how to use config map and secret volumes in Kubernetes, providing real-life use cases and syntax for using volumes in a pod configuration. The video tutorial demonstrates the creation and usage of config map and secret volumes in Kubernetes, offering real-life use cases and syntax examples for using volumes in a pod configuration.', 'Examples include applications like Prometheus, Elasticsearch, Mosquito Message Broker, and NGINX, as well as the creation of individual key value pairs and files for mounting into pods. Real-life use cases such as applications like Prometheus, Elasticsearch, Mosquito Message Broker, and NGINX are provided, along with the creation of individual key value pairs and files for mounting into pods.', 'The video tutorial demonstrates the creation and usage of config map and secret volumes in Kubernetes, offering real-life use cases and syntax examples for using volumes in a pod configuration. The video tutorial demonstrates the creation and usage of config map and secret volumes in Kubernetes, offering real-life use cases and syntax examples for using volumes in a pod configuration.', 'Real-life use cases such as applications like Prometheus, Elasticsearch, Mosquito Message Broker, and NGINX are provided, along with the creation of individual key value pairs and files for mounting into pods. Real-life use cases such as applications like Prometheus, Elasticsearch, Mosquito Message Broker, and NGINX are provided, along with the creation of individual key value pairs and files for mounting into pods.', 'The chapter explains how to use config map and secret volumes in Kubernetes, providing real-life use cases and syntax for using volumes in a pod configuration. The video tutorial demonstrates the creation and usage of config map and secret volumes in Kubernetes, offering real-life use cases and syntax examples for using volumes in a pod configuration.']}, {'end': 511.077, 'start': 180.612, 'title': 'Managing configurations and secrets in mosquito', 'summary': 'Details the creation of configuration files and secrets in mosquito, covering the use cases of defining files and client certificates, as well as the process of mounting files into a mosquito pod using config maps and secrets.', 'duration': 330.465, 'highlights': ['The chapter details the creation of configuration files and secrets in Mosquito. It covers the process of defining files and client certificates, as well as the process of mounting files into a Mosquito pod using config maps and secrets.', 'Use cases of defining files and client certificates are explained. The use cases of defining files and client certificates for services are mentioned, providing examples of creating secret components and defining client certificate files.', 'Process of mounting files into a Mosquito pod using config maps and secrets is described. The chapter explains the process of mounting configuration files and secret files into a Mosquito pod using config maps and secrets, emphasizing the importance of having the config map and secret components already in the cluster before starting the pod.']}], 'duration': 510.748, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU329.jpg', 'highlights': ['The chapter explains how to use config map and secret volumes in Kubernetes, providing real-life use cases and syntax for using volumes in a pod configuration.', 'The video tutorial demonstrates the creation and usage of config map and secret volumes in Kubernetes, offering real-life use cases and syntax examples for using volumes in a pod configuration.', 'Real-life use cases such as applications like Prometheus, Elasticsearch, Mosquito Message Broker, and NGINX are provided, along with the creation of individual key value pairs and files for mounting into pods.', 'The chapter details the creation of configuration files and secrets in Mosquito, covering the process of defining files and client certificates, as well as the process of mounting files into a Mosquito pod using config maps and secrets.', 'The chapter explains the process of mounting configuration files and secret files into a Mosquito pod using config maps and secrets, emphasizing the importance of having the config map and secret components already in the cluster before starting the pod.']}, {'end': 1013.087, 'segs': [{'end': 543.731, 'src': 'embed', 'start': 511.597, 'weight': 2, 'content': [{'end': 523.368, 'text': "So what we're going to do here is add volumes to this configuration and the way to do that is using volumes attribute at the containers level.", 'start': 511.597, 'duration': 11.771}, {'end': 524.309, 'text': 'So remember,', 'start': 523.508, 'duration': 0.801}, {'end': 543.731, 'text': "this is a specification of the pod and inside the pod specification we define volumes and here we list all the volumes that we want to mount into that pod and we just give it names like let's call this mosquito config.", 'start': 524.309, 'duration': 19.422}], 'summary': "Adding volumes to a configuration using volumes attribute at the containers level with the name 'mosquito config'.", 'duration': 32.134, 'max_score': 511.597, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU511597.jpg'}, {'end': 659.25, 'src': 'heatmap', 'start': 567.642, 'weight': 3, 'content': [{'end': 574.886, 'text': "So I'm going to write config map and the name of that config map is this one right here.", 'start': 567.642, 'duration': 7.244}, {'end': 577.581, 'text': "And that's it.", 'start': 576.741, 'duration': 0.84}, {'end': 581.922, 'text': "We mounted father's config map created into the pod.", 'start': 577.841, 'duration': 4.081}, {'end': 584.762, 'text': "And now let's do the same for the secret.", 'start': 582.862, 'duration': 1.9}, {'end': 588.243, 'text': "Let's call it mosquito secrets.", 'start': 586.523, 'duration': 1.72}, {'end': 599.425, 'text': 'And the attribute for secret, this is, again, the volume type secret and the attribute is secret name.', 'start': 592.984, 'duration': 6.441}, {'end': 609.495, 'text': 'And this is the name and this is basically just some random secret file that we are creating just for the demonstration.', 'start': 602.645, 'duration': 6.85}, {'end': 613.8, 'text': 'OK, so now I have both volume types mounted into the pod.', 'start': 609.736, 'duration': 4.064}, {'end': 622.949, 'text': 'The next step is that now you have to mount those volumes inside the container because the application is actually running inside the container.', 'start': 614.2, 'duration': 8.749}, {'end': 630.771, 'text': 'So if we want the application to use that, we have to mount whatever is available here inside the container.', 'start': 623.388, 'duration': 7.383}, {'end': 635.192, 'text': 'And the way to do that is inside each individual container.', 'start': 631.311, 'duration': 3.881}, {'end': 637.633, 'text': 'So you may have a list of containers here.', 'start': 635.272, 'duration': 2.361}, {'end': 640.474, 'text': 'So you have to do that for each individual container.', 'start': 638.033, 'duration': 2.441}, {'end': 642.415, 'text': 'So we have just one here.', 'start': 640.814, 'duration': 1.601}, {'end': 645.516, 'text': "And inside that, I'm going to create volume.", 'start': 642.615, 'duration': 2.901}, {'end': 651.305, 'text': 'mounts attribute with camel case like this.', 'start': 647.182, 'duration': 4.123}, {'end': 659.25, 'text': "And here again, I'm going to list all the volumes that I want to mount from pod to container.", 'start': 652.386, 'duration': 6.864}], 'summary': 'Config map and secret mounted into pod and container for application use.', 'duration': 81.409, 'max_score': 567.642, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU567642.jpg'}, {'end': 772.244, 'src': 'embed', 'start': 746.369, 'weight': 6, 'content': [{'end': 756.877, 'text': "one very common case is that, for example, when you're mounting a client certificate, which is maybe used in many different applications,", 'start': 746.369, 'duration': 10.508}, {'end': 759.859, 'text': 'you may want to add a read only attribute to that.', 'start': 756.877, 'duration': 2.982}, {'end': 766.242, 'text': "which makes sense because you don't want the applications to modify those certificate files.", 'start': 760.279, 'duration': 5.963}, {'end': 768.482, 'text': "They're just there for reading.", 'start': 766.342, 'duration': 2.14}, {'end': 772.244, 'text': 'So you can add read only true attribute to that.', 'start': 769.103, 'duration': 3.141}], 'summary': 'When mounting a client certificate, adding a read-only attribute makes sense to prevent modification by applications.', 'duration': 25.875, 'max_score': 746.369, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU746369.jpg'}, {'end': 848.028, 'src': 'embed', 'start': 800.168, 'weight': 1, 'content': [{'end': 804.031, 'text': 'For example, if you have Elasticsearch, it has a default config location.', 'start': 800.168, 'duration': 3.863}, {'end': 807.855, 'text': "It's, I believe, slash etc slash Elasticsearch.", 'start': 804.332, 'duration': 3.523}, {'end': 814.06, 'text': 'So the config location will be different for NGINX is ETC, NGINX, et cetera.', 'start': 808.315, 'duration': 5.745}, {'end': 815.662, 'text': 'Same with secret.', 'start': 814.34, 'duration': 1.322}, {'end': 821.286, 'text': 'For example, if you have your own application that expects passwords file at a specific location,', 'start': 815.782, 'duration': 5.504}, {'end': 827.392, 'text': 'then you want to mount that secret into that specific location so that the application can find it.', 'start': 821.286, 'duration': 6.106}, {'end': 835.462, 'text': 'This concept here of first mounting the volumes in the pod and then mounting into the container basically is useful.', 'start': 828.459, 'duration': 7.003}, {'end': 844.106, 'text': 'if you have multiple containers, you can decide which container gets access to which volumes that pod has available,', 'start': 835.462, 'duration': 8.644}, {'end': 848.028, 'text': 'so you can actually decide to give one container one volume.', 'start': 844.106, 'duration': 3.922}], 'summary': 'Explains the concept of mounting volumes in pods and containers, allowing specific access to volumes for multiple containers.', 'duration': 47.86, 'max_score': 800.168, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU800168.jpg'}, {'end': 957.032, 'src': 'embed', 'start': 927.458, 'weight': 0, 'content': [{'end': 932.641, 'text': 'And here previously was this default configuration file that we overwrote.', 'start': 927.458, 'duration': 5.183}, {'end': 933.442, 'text': 'If I.', 'start': 933.081, 'duration': 0.361}, {'end': 942.106, 'text': 'display that these are the contents of the new configuration file that we mounted that mosquito now uses.', 'start': 934.742, 'duration': 7.364}, {'end': 944.246, 'text': 'So, to summarize,', 'start': 942.866, 'duration': 1.38}, {'end': 957.032, 'text': 'what we saw in this video is config map and secret components in communities are used both to create individual key pair values that you can use as values of environmental variables,', 'start': 944.246, 'duration': 12.786}], 'summary': 'The video demonstrates using config map and secret components in kubernetes to create key pair values for environmental variables.', 'duration': 29.574, 'max_score': 927.458, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU927458.jpg'}], 'start': 511.597, 'title': 'Using volumes in kubernetes', 'summary': 'Demonstrates adding volumes to a pod configuration and mounting volumes inside containers, including working with configmap and secret components in kubernetes, allowing control over access to specific volumes.', 'chapters': [{'end': 609.495, 'start': 511.597, 'title': 'Adding volumes to pod configuration', 'summary': 'Demonstrates adding volumes to a pod configuration using the volumes attribute at the containers level, including mounting a config map volume type and a secret volume type, with specific names and attributes.', 'duration': 97.898, 'highlights': ['The chapter explains the process of adding volumes to a pod configuration using the volumes attribute at the containers level, detailing the specification of the pod and the definition of volumes inside the pod specification.', 'It demonstrates the mounting of a config map volume type into the pod, specifying the name of the config map, and then proceeds to mount a secret volume type with a specific name and attribute, creating a random secret file for demonstration purposes.']}, {'end': 821.286, 'start': 609.736, 'title': 'Mounting volumes inside containers', 'summary': 'Explains the process of mounting volumes inside containers, detailing the steps and attributes required for the mount path and name, as well as providing examples of use cases, such as read-only attributes for certificate files and configuration files.', 'duration': 211.55, 'highlights': ['Mounting volumes inside containers involves specifying the name and mount path for each volume, ensuring the availability of the files inside the pod, and considering specific use cases for read-only attributes. N/A', 'The process requires creating volume mounts attributes with camel case and listing all the volumes to be mounted from pod to container. N/A', 'Examples of use cases include adding a read-only attribute for mounting client certificate files to prevent applications from modifying them. N/A', 'The chapter highlights the importance of considering the path value depending on the application, citing examples such as Elasticsearch and NGINX with different default config locations. N/A']}, {'end': 1013.087, 'start': 821.286, 'title': 'Using configmap and secret in kubernetes', 'summary': 'Explains the usage of configmap and secret components in kubernetes to create key pair values for environmental variables or configuration files, and highlights the capability to mount volumes in pods and containers, allowing control over which container has access to specific volumes.', 'duration': 191.801, 'highlights': ['The concept of mounting volumes in the pod and then into the container is useful for controlling access to specific volumes for multiple containers within a pod, providing flexibility in assigning volume access (e.g., giving one container access to one storage or not giving access to another).', 'The usage of ConfigMap and Secret components in Kubernetes allows for the creation of individual key pair values for environmental variables or configuration files, which is a common use case for many services.', 'ConfigMap and Secret are local volume types in Kubernetes, often overlooked initially as they differ from typical volumes created with the persistent volume component, emphasizing their distinct usage as local volumes within the Kubernetes environment.']}], 'duration': 501.49, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FAnQTgr04mU/pics/FAnQTgr04mU511597.jpg', 'highlights': ['The usage of ConfigMap and Secret components in Kubernetes allows for the creation of individual key pair values for environmental variables or configuration files, which is a common use case for many services.', 'The concept of mounting volumes in the pod and then into the container is useful for controlling access to specific volumes for multiple containers within a pod, providing flexibility in assigning volume access (e.g., giving one container access to one storage or not giving access to another).', 'The chapter explains the process of adding volumes to a pod configuration using the volumes attribute at the containers level, detailing the specification of the pod and the definition of volumes inside the pod specification.', 'It demonstrates the mounting of a config map volume type into the pod, specifying the name of the config map, and then proceeds to mount a secret volume type with a specific name and attribute, creating a random secret file for demonstration purposes.', 'Mounting volumes inside containers involves specifying the name and mount path for each volume, ensuring the availability of the files inside the pod, and considering specific use cases for read-only attributes.', 'The process requires creating volume mounts attributes with camel case and listing all the volumes to be mounted from pod to container.', 'Examples of use cases include adding a read-only attribute for mounting client certificate files to prevent applications from modifying them.', 'The chapter highlights the importance of considering the path value depending on the application, citing examples such as Elasticsearch and NGINX with different default config locations.']}], 'highlights': ['The chapter explains how to use config map and secret volumes in Kubernetes, providing real-life use cases and syntax for using volumes in a pod configuration.', 'The video tutorial demonstrates the creation and usage of config map and secret volumes in Kubernetes, offering real-life use cases and syntax examples for using volumes in a pod configuration.', 'Real-life use cases such as applications like Prometheus, Elasticsearch, Mosquito Message Broker, and NGINX are provided, along with the creation of individual key value pairs and files for mounting into pods.', 'The chapter details the creation of configuration files and secrets in Mosquito, covering the process of defining files and client certificates, as well as the process of mounting files into a Mosquito pod using config maps and secrets.', 'The chapter explains the process of mounting configuration files and secret files into a Mosquito pod using config maps and secrets, emphasizing the importance of having the config map and secret components already in the cluster before starting the pod.', 'The usage of ConfigMap and Secret components in Kubernetes allows for the creation of individual key pair values for environmental variables or configuration files, which is a common use case for many services.', 'The concept of mounting volumes in the pod and then into the container is useful for controlling access to specific volumes for multiple containers within a pod, providing flexibility in assigning volume access (e.g., giving one container access to one storage or not giving access to another).', 'The chapter explains the process of adding volumes to a pod configuration using the volumes attribute at the containers level, detailing the specification of the pod and the definition of volumes inside the pod specification.', 'It demonstrates the mounting of a config map volume type into the pod, specifying the name of the config map, and then proceeds to mount a secret volume type with a specific name and attribute, creating a random secret file for demonstration purposes.', 'Mounting volumes inside containers involves specifying the name and mount path for each volume, ensuring the availability of the files inside the pod, and considering specific use cases for read-only attributes.', 'The process requires creating volume mounts attributes with camel case and listing all the volumes to be mounted from pod to container.', 'Examples of use cases include adding a read-only attribute for mounting client certificate files to prevent applications from modifying them.', 'The chapter highlights the importance of considering the path value depending on the application, citing examples such as Elasticsearch and NGINX with different default config locations.']}