Kubernetes ConfigMap and Secret as Kubernetes Volumes | Demo

Demo of using ConfigMap and Secret as Kubernetes Volumes | Kubernetes ConfigMap | Kubernetes Secrets | Kubernetes Volumes
► Subscribe To Me On KZread: 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: gitlab.com/nanuchi/kubernetes...
► Kubernetes Volumes Explained: • Kubernetes Volumes exp...
▬▬▬▬▬▬ 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 ► bit.ly/2YGeRp9
DevOps Tools, like Ansible ► bit.ly/2W9UEq6
Complete K8s Application Setup ► • Complete Application D...
Kubernetes Components explained ► • Kubernetes Components ...
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 ► bit.ly/32UVSZP
Don't forget to subscribe ► bit.ly/3mO4jxT
DEV ► bit.ly/3h2fqiO
INSTAGRAM ► bit.ly/2F3LXYJ
TWITTER ► bit.ly/3i54PUB
LINKEDIN ► 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.

Пікірлер: 163

  • @TechWorldwithNana
    @TechWorldwithNana4 жыл бұрын

    ► Reference to YAML Configs: gitlab.com/nanuchi/kubernetes-tutorial-series-youtube/-/tree/master/configmap-and-secret-volumes 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 👉🏼 For any questions/issues/feedback, please leave me a comment and I will get back to you as soon as possible. Please don't forget to subscribe and give me a thumbs up if you liked my video 😊🙏

  • @SuperDeb1985

    @SuperDeb1985

    3 жыл бұрын

    what will happen if we delete file from volume from container ,will it be deleted from pod too ?

  • @rajasivagaminathan9828
    @rajasivagaminathan98283 жыл бұрын

    Nana the life saver of kubernetes developers

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    I'm glad that you think so Raja 😅 Thanks for the support. Please don't forget to subscribe and share. 🙂

  • @kushagraahire1871
    @kushagraahire18713 ай бұрын

    I signed up for java but they are also giving me work related to devops. This video is a life saver.😅

  • @raghavops146
    @raghavops1463 жыл бұрын

    Thank you Naina! what an amazing tutorial and you got the greatest acumen to explain complex things. Kubernetes is no monster to me now after watching your videos. Thanks for being magnanimous and sharing your videos which are worth gold. God bless you!

  • @adimardev1550
    @adimardev1550 Жыл бұрын

    after watching lots of devops toturials, everything is becoming a lot more easier. thanks for our great youtube content creators like Nana and others...

  • @SERV007
    @SERV0074 жыл бұрын

    I have been watching some of the k8s videos. The animated diagrams and the way each sucbject is approached makes complex topics look simple. Tha's a rare talent right there.

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Wow, thank you for this comment! Glad you think so. If you want to support me, please share my video to people who are interested in learning k8s or devops in general. Would be very helpful :)

  • @guilhermegiusti04
    @guilhermegiusti043 жыл бұрын

    No doubt, when we talk about kubernetes your channel is the best

  • @pratapreddy231
    @pratapreddy2313 жыл бұрын

    I love this video. I learn from a detailed explanation. Thank you so much!

  • @AdityaSingh-ih1fz
    @AdityaSingh-ih1fz4 жыл бұрын

    I have always struggled to get a clear understanding of the use cases of configMap and secret but thanks to you for making it so simple to understand and remember.

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    You're welcome Aditya. Wishing you all the best in your career. Stay safe. 😇

  • @sylvia-liu
    @sylvia-liu2 жыл бұрын

    It became so much clear after watching your video. Great explanation! Thanks for sharing.

  • @_Username__
    @_Username__3 жыл бұрын

    I play her vids as comforting BGM while I code other stuff :)

  • @lutif1415
    @lutif14154 жыл бұрын

    Putting a like before even watching., 👍👍👍

  • @pallavkan
    @pallavkan4 жыл бұрын

    best channel to learn K8s. Explanation is simple and can easily be remembered. Brilliant!!

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Thankful for the opportunity to help Pallav. Your compliment is much appreciated. 😇

  • @SilverWyn23
    @SilverWyn232 жыл бұрын

    High quality education videos! Thank you for your great work ^^

  • @AmolGautam
    @AmolGautam Жыл бұрын

    Thank you so much for this video. I constantly come back to this and refer a few things.

  • @ianku
    @ianku Жыл бұрын

    this video was lifesaver for me thanks for these quality content

  • @jeeperscreepers7
    @jeeperscreepers7 Жыл бұрын

    Best video on configmaps on KZread, thx!

  • @arpitashriwastav5095
    @arpitashriwastav50954 жыл бұрын

    Thank you so much for this vedio, from some days i m struggling on this topic and today your vedio appear like miracle to me♥️♥️♥️♥️♥️♥️

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    You're welcome, really glad to hear that they helped you :)

  • @ashrafhariff1580
    @ashrafhariff15803 жыл бұрын

    Hi Nana, thank you for your videos they're incredible. I was wondering if you had a demo video for local persistent volumes?

  • @nirmaljha1453
    @nirmaljha14532 жыл бұрын

    This was amazing demonstration of config map.

  • @amarlukade2225
    @amarlukade22253 жыл бұрын

    perfectly explained.. really helped me all doubts ... youuuuu rocks !!!! thank you

  • @jaspaljuneja7708
    @jaspaljuneja77083 жыл бұрын

    Thankyou so very much ankita, this video lecture was like a walk on snow you made it just so easy. Keep it up!!

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Thank you for the encouragement Jaspal. Just the little things that I need to fuel my passion. Much appreciated. 😇

  • @amulsharma8172
    @amulsharma81723 жыл бұрын

    Thanks nana, you r genius, beauty with brain, such an extraordinary person. Thanks a lot. Grat work keep it up ❤❤

  • @flinox
    @flinox2 жыл бұрын

    Great video Nana, tks so much for share this knoledge with us !!

  • @SandroAldave
    @SandroAldave3 жыл бұрын

    You are great at explaining concepts. Keep it up!!

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Thank you Sandro :)

  • @SrikarAnanthula
    @SrikarAnanthula2 жыл бұрын

    simplicity ! as usual awesome.

  • @bharathkumar2007
    @bharathkumar20072 ай бұрын

    What a wonderful explanation - Must know concepts explained in very simple way. Well done :)

  • @allards
    @allards Жыл бұрын

    Thank you, the best explanation of this subject i found.

  • @vipinkoul9129
    @vipinkoul91293 жыл бұрын

    Waiting for your other videos on different volume types.

  • @saravanachilla
    @saravanachilla3 жыл бұрын

    You are an amazing presenter. Good work.

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Grateful for the appreciation Saravana. 😅

  • @nmrkmsis2000
    @nmrkmsis20004 жыл бұрын

    WoWwwww thank you so much. You are simply great. I asked the content and you have recorded.😍😍😍😍😍

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Thanks Murali :)

  • @cobalt_3283
    @cobalt_32832 жыл бұрын

    Very helpful, thanks Nana!

  • @Hackenbaker
    @Hackenbaker2 жыл бұрын

    I always learn something new thanks to you 🙏

  • @kemibrianolimba682
    @kemibrianolimba6827 ай бұрын

    Thanks Nana. that was a great explanation

  • @mabanu7711
    @mabanu7711 Жыл бұрын

    Thanks Nana for the explanation and implementation

  • @deepakg3331
    @deepakg33314 жыл бұрын

    Its nice lecture am the fan of u, the way u r taking in to the topics keep on

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Thank you Deepak, glad you like my teaching style :)

  • @rokofromhell9264
    @rokofromhell92644 жыл бұрын

    Thanks a lot! I love your videos!

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Happy to see that you watch all my videos :) Thanks for that!

  • @rajasekharp1176
    @rajasekharp1176 Жыл бұрын

    Thanks Nana for this tutorial. I find it very useful and Appreciate your good job.

  • @andreilq
    @andreilq4 жыл бұрын

    Very good and precise tutorial!

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Thank you so much :)

  • @nagendrareddybandi1710
    @nagendrareddybandi17103 жыл бұрын

    HI Nana, Excellent Video & Nice the way of presentation. Thanks for your time for this. I just have one query on this. in POD definition file under spec: volumes, is it mean volume will create? and the files mosquite-config & secret-file will store on base machine?

  • @srinathvk
    @srinathvk4 жыл бұрын

    nice walk through of Vol and Secret. Looking forward to learn about local volume as i got 'node affinity conflict' error on mac using docker-desktop

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Thanks, video will come soon!

  • @ro2010jo

    @ro2010jo

    2 жыл бұрын

    @@TechWorldwithNana , Many thanks for the excellent videos. I found your explanations to be very useful. Have you finished/posted detailed videos for local and remote volumes, explaining the Yaml files? If so, can you please share the link?

  • @davidjhons2549
    @davidjhons25493 ай бұрын

    Congratulations🎉 For 1 M

  • @raphaelkrupinski7572
    @raphaelkrupinski7572 Жыл бұрын

    Thanks for the great explanation! Is there a way to mount a single file, like in docker or does it work only for directories

  • @sahilsethi2132
    @sahilsethi21323 жыл бұрын

    great and simple explanation

  • @ravism1585
    @ravism15852 жыл бұрын

    Great, good to start with basics

  • @namanrawal5849
    @namanrawal58493 жыл бұрын

    thank you! This helped me solve a problem with keycloak and realm-export.json. Does the overwrite create the file if the file doesn't exist, or does it simply overwrite what is already there?

  • @ianzhang7048
    @ianzhang70484 жыл бұрын

    Great video, really helpful!

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Thanks Ian. 😇

  • @DevOpsJourney
    @DevOpsJourney4 жыл бұрын

    I love kubernetes. Just recently been doing some videos on it on my channel

  • @ajk7151
    @ajk71512 жыл бұрын

    excellent explanation!

  • @Alhansy21
    @Alhansy212 жыл бұрын

    Thanks Nana for your incredible video, I’ve a small question please How can I create that data: secret.file and how it’s equal to the secret data: params I don’t know how make them equal each other ?

  • @rush2112chile
    @rush2112chile2 жыл бұрын

    La mejor explicación! te amo!

  • @Joy-vo4ne
    @Joy-vo4ne Жыл бұрын

    Great vedieo. Learned a lot from you. Thanks Nana. It looks like you have used a wrong screenshot at 16:13. while you used the top left with kind/configmap, you use kind/secret for using env variable case.

  • @decisionsystems4984
    @decisionsystems49842 жыл бұрын

    Wonderful video! At 7:34 you show the format of the config-file.yaml file. When I do the same, I get separate files; one for each key versus all keys and values being stored in mosquitto.conf What could I be doing wrong? Have K8 changed since this video? Thanks.

  • @rauldee
    @rauldee3 жыл бұрын

    Hello Nana, Great course ,Is it possible to mount kubeconfig file this way ,so that the PODs can access them .I have a use case with that

  • @mohammedsuhailbasha4860
    @mohammedsuhailbasha48604 жыл бұрын

    Thanks for your beautiful explaination.please make and upload videos on statefulsets.

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Hi Mohammed! Thank you, yes I will make a separate video about statefulSets. Turn on the bell to get notified and don't miss new videos :)

  • @George-mk7lp
    @George-mk7lp2 жыл бұрын

    you are awesome Nana!

  • @dconwheels5309
    @dconwheels53093 жыл бұрын

    Very good explanation. Please suggest if I have store these secret and configmap files in a separate secure location instead of keeping them with deployment files then how to put it in the deployment file..

  • @prasadjaiswal353
    @prasadjaiswal353 Жыл бұрын

    Thank you so much, I learned a lot through these devops videos also could you help me understand if we can pass Configmap metadata name as variable if it’s dynamic in deployment pods.. along with keys.

  • @peregineme
    @peregineme2 жыл бұрын

    Thanks for this. Is there a way to make them (configmap and secret) persistent?

  • @jayashrees1992
    @jayashrees19923 жыл бұрын

    Thanks .it is very helpful

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    You're welcome Jayashree.😇

  • @Sachin2011jan
    @Sachin2011jan Жыл бұрын

    Very well explained

  • @hamidullahmuslih6301
    @hamidullahmuslih63012 жыл бұрын

    awesome explaination!!

  • @devved8615
    @devved86152 жыл бұрын

    What is best practice to separate development (local development) and production (k8s) ?

  • @You9553
    @You95532 жыл бұрын

    Hi Nana, Is there a way to append contents to the .conf file instead of overwriting the whole file?

  • @alexandr55443
    @alexandr554434 жыл бұрын

    Great!!!

  • @akashdubey8341
    @akashdubey8341 Жыл бұрын

    Hi Nana, will spring boot be able to pick up application.properties file from /config location. Thanks for video

  • @soujatyabhattacharya1530
    @soujatyabhattacharya1530 Жыл бұрын

    Wonderful Video Nana ❤❤

  • @Nemhesis10
    @Nemhesis10Ай бұрын

    excellent example!!! it's possible use this volumeMount to declare envs, using cat /secret/secret.file?

  • @Sami-bc9iv
    @Sami-bc9iv3 жыл бұрын

    Excellent!!!!

  • @Hackenbaker
    @Hackenbaker3 жыл бұрын

    Thanks a lot!

  • @rakeshnagarajan7701
    @rakeshnagarajan77013 жыл бұрын

    Hi nana, which software are you using to create these animations?

  • @pengdu7751
    @pengdu77513 жыл бұрын

    awesome video!

  • @sabriboubaker
    @sabriboubaker3 жыл бұрын

    Great explanation! One question: can we change the value of configmap mountes as a volume? I mean if i add a line into the file mosquito.file from one pod, will i be able to see it from another pod ? Thanks

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Thanks Sabri. No, you can't change configMap value from the pod.

  • @hariharansiddharthsuresh1240
    @hariharansiddharthsuresh12403 жыл бұрын

    I've gone through a lot of videos of yours pertaining to kubernetes and they've been really good and easy to understand. But i have one question here. If the requirement of a config file is known well before hand, is it better to bake it in the docker image while creating or is use of configmaps recommended ?

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    ConfigMaps may change often, if you change the endpoint names, add new ones or change some config details. So by having it outside of docker image, you don't have to rebuild the image. Also you can pass the config map or secret to diff applications, if they both need the same service.

  • @hariharansiddharthsuresh1240

    @hariharansiddharthsuresh1240

    3 жыл бұрын

    @@TechWorldwithNana Thank You!

  • @inzheneher
    @inzheneher3 жыл бұрын

    Hi Nana, is it possible to create secret specification for creating secret from file, not from command line with --from-file attribute?

  • @hector_qa7322
    @hector_qa73222 жыл бұрын

    Guys please show some love on the comments, remember all this Kubernetes training is well made and besides it is free

  • @MelomaniacForever
    @MelomaniacForever2 жыл бұрын

    you are the best!

  • @charankowndinya94
    @charankowndinya943 жыл бұрын

    super explanation

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Thanks 🙂

  • @tapas511
    @tapas51110 ай бұрын

    Awesome. It's an easy to understand concept. Do you have full courses in udemy?

  • @headinthekloudz
    @headinthekloudz4 жыл бұрын

    Thanks nana🥳

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    You're welcome :)

  • @Mr1911995
    @Mr1911995Ай бұрын

    Can you please explain where do the symlinks that the newly sourced files via the configmap and the secret point to?

  • @bhaskar6705
    @bhaskar67054 жыл бұрын

    Hey it’s great video 😀

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    Thanks, glad you like it :)

  • @user-rv6mu4xu6p
    @user-rv6mu4xu6p3 ай бұрын

    clean tqsm

  • @rajeshraju5060
    @rajeshraju50602 жыл бұрын

    Hi Nana, How to use configure Centralised configuration by using configmap in the kustomization.

  • @jaja43511
    @jaja435112 жыл бұрын

    Few questions: 1. Can you delete a configmap then deploy a new one while a pod is still running or using it? 2. Can you change something in a configmap while it is being used by a running pod? will the pod detect the changes in the configmap?

  • @ashishemc2
    @ashishemc23 жыл бұрын

    Grt tutorials Nana. Could you explain difference between secret and config map, except the data is encoded in secret as base64.... anyone can get the secret using 'kubectl get secret "secretname" -o yaml' and decode from base64, Is there any other key difference that iam missing?

  • @bhavyasreethakur6634
    @bhavyasreethakur66344 жыл бұрын

    Thank you so much for this video, can you also explain about ConfigMap generator to configure secrets & Certificates from json file

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Hi Bhavyasree! You're welcome. Hopefully we can add that to the pipeline. Appreciate the support. 🙂

  • @_Username__
    @_Username__3 жыл бұрын

    hey Nana, they released XML for k8s, please talk about that

  • @armelgansop4039
    @armelgansop40394 жыл бұрын

    Thanks Nana did you create a persistent volume and pvc for this example I know in real world if the container gets restarted we lose all data ?

  • @TechWorldwithNana

    @TechWorldwithNana

    4 жыл бұрын

    No. That's the difference with configMap and secret. You don't need PV and PVC with them. They persist independent of the pod, so when you restart the pod, it will get remounted every time, so you don't lose the data. you can also use the same configMap and secret in multiple pods. For example if you have 5 pods that all need a client certificate, you create one secret and mount it in every pod. Does it clarify your point?

  • @armelgansop4039

    @armelgansop4039

    4 жыл бұрын

    @@TechWorldwithNana Absolutely 👌

  • @sdcookingpassion
    @sdcookingpassion3 жыл бұрын

    I am applying the same mosquitto-config-components.yaml from your repo. I can see the Secret generated for mosquitto to use . But when i logged into the mosquitto pod, I do see /mosquitto/config but not the /mosquitto/secret directory. Any debugging step that can help. No errors on kubectl apply or kubectl pod

  • @sanooosai
    @sanooosai2 жыл бұрын

    thank you

  • @arturolucas776
    @arturolucas776 Жыл бұрын

    amazing

  • @ColumbusO
    @ColumbusO2 жыл бұрын

    Hi, I want to have a fixed number of pods in K8 and each pod will have slightly different configuration, I want this because I want to divide the work among each pods, is there a way to do this ? Thanks in advance.

  • @drsquarefx
    @drsquarefx3 жыл бұрын

    Can we share the storage volumes in between two pods in k8s cluster

  • @kayoutube690
    @kayoutube690 Жыл бұрын

    Hi Nana, I just wanted to ask if do you have module for AWS parameter store for eks??

  • @adithjawahar1638
    @adithjawahar1638 Жыл бұрын

    Hi Nana, suppose i am already having a json file in my container, I just need to replace a certain value in that file. What will i do in that scenario?

  • @chrispure7461
    @chrispure74613 жыл бұрын

    What if my pod wants to dynamically refresh the secret (password, if it changes) from configmap volume without restarting the pod?

  • @vipinkoul9129
    @vipinkoul91293 жыл бұрын

    Awesome :-)

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    Thank you Vipin. That makes you awesome as well. 🙂

  • @amitji24x7
    @amitji24x72 жыл бұрын

    Hi Nana, I don't understand the point of secrets if I have access to secret manifest and can decode it?

  • @wchopite
    @wchopite3 жыл бұрын

    What about versioning those files? I mean: For example, I have my code with a k8s folder with some files like: deployment.yaml, service.yaml, config.yaml... My question is: Do I must to add a secret.yaml file to the repo versioning? Thanks and your videos are so cool

  • @TechWorldwithNana

    @TechWorldwithNana

    3 жыл бұрын

    That's a very good question Wladimir. Regarding versioning of secret files, of course they shouldn't be checked in to the repository with other config files. So they are created locally, on the server itself or from your local machine where you execute kubectl commands. You can try to keep the history locally and/or on the cluster node, if others need access too.

  • @wchopite

    @wchopite

    3 жыл бұрын

    ​@@TechWorldwithNana Excellent. Thank you for your reply. I'm doing exactly what you are saying. Let me congratulate you again, your channel, your videos are very useful and a great resource. Thank very much!

Келесі