[ Kube 12 ] Init Containers in Kubernetes Cluster

  Рет қаралды 18,041

Just me and Opensource

Just me and Opensource

5 жыл бұрын

In this video, I will show you how to use Init containers in Kubernetes cluster.
Github: github.com/justmeandopensourc...
Any questions/feedback/issues, please drop me a comment. If you liked the video, please share it with your friends and don't forget to subscribe to my channel.
Thanks for watching this video and I hope you found it informative.
If you wish to support me:
www.paypal.com/cgi-bin/webscr...

Пікірлер: 73
@mathewkargarzadeh3158
@mathewkargarzadeh3158 5 жыл бұрын
Excellent illustration of the init container under the hood. I loved it. in our environment for pod deployment we uses the init container side-car to get the deployment configuration from the vault. this is a subject that not too many Engineers delve into. and kubectl describe pod should tell you if the init container has any issue before starting the real application container. Thank you for the inside you shared in your illustration. you are the Man!! Thanks again. Mat.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Matthew, thanks for watching this video and taking time to comment/appreciate. Cheers.
@DeepakKumar-fc3hn
@DeepakKumar-fc3hn 3 жыл бұрын
very nicely explained thanks for such videos
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Deepak, thanks for watching. Cheers.
@rahmatjulizar6397
@rahmatjulizar6397 4 жыл бұрын
Thanks so much for this tutorial.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Rahmat, Thanks for watching. Cheers.
@mrjamiebowman1337
@mrjamiebowman1337 3 жыл бұрын
this was a really good video. Thanks!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Jamie, thanks for watching.
@niyashaneef8840
@niyashaneef8840 3 жыл бұрын
Well Explained .Thnk You
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Niyas, thanks for watching.
@snehotoshbanerjee1938
@snehotoshbanerjee1938 3 жыл бұрын
Great video!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thanks for watching.
@vamshidharreddygottam2626
@vamshidharreddygottam2626 5 жыл бұрын
It's good effort of you for making such nice videos, but small suggestion from my side, plz try to avoid the sound "cho cho" (observe at 11th sec) which is repeating throughout all the videos.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Vamshidhar, thanks for watching this video and taking time to give feedback. Thats a great observation. I just noticed it after you mentioned it. I don't think that I am making that sound. Anyways, will try to avoid that if possible in future videos. Thanks, Venkat
@indranilbanerjee5521
@indranilbanerjee5521 3 жыл бұрын
Gr8 explanation
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Indranil, thanks for watching. Cheers.
@ptkalex2627
@ptkalex2627 4 жыл бұрын
Good one VN
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Alex, thanks for watching this video.
@TheAirak
@TheAirak 4 жыл бұрын
Many thanks!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
You are welcome.
@derekreed6798
@derekreed6798 Жыл бұрын
Nice vid.
@justmeandopensource
@justmeandopensource Жыл бұрын
Thanks for watching Derek.
@vujanic88
@vujanic88 3 жыл бұрын
great, thanks
@justmeandopensource
@justmeandopensource 3 жыл бұрын
You are welcome. Thanks for watching.
@jagadeesh0014
@jagadeesh0014 3 жыл бұрын
Hi Venkat,Once again many more thanks, This video helps a lot to understand the concepts, what is the main difference between jobs and INIT containers.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Jagan, thanks for watching.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
kubernetes.io/docs/concepts/workloads/pods/init-containers/ kubernetes.io/docs/concepts/workloads/controllers/job/
@saivenkataratnamemmani1936
@saivenkataratnamemmani1936 3 жыл бұрын
can you please explain what is CNI in layman's terms or real time usage. Thank you
@anilmahaptara
@anilmahaptara 4 жыл бұрын
Hi Venkat, Your videos are much informative and has been a great help for me. I have been learning from your videos. I just have one question, can we see the logs of the init container?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Anil, thanks for watching. Yes, you can see the logs of any container in a pod. Since in this situation you have more than one container running in the same pod, you need to specify the container name as well when looking at the logs. $ kubectl logs -c cheers.
@nikitashesterikov1175
@nikitashesterikov1175 4 жыл бұрын
Its awesome, fast and wide. Also a question: what is the autocomplit tool? Its awesome too!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Nikita, thanks for watching. I use Manjaro Linux distribution with Gnome desktop environment. I also use ZSH shell with oh-my-zsh. For the auto complete feature, I used zsh-autosuggestions plugin with zsh. It suggests commands based on your command history. I have explained that in the below video. kzbin.info/www/bejne/qaCkqIinZ8iEfrM Cheers.
@biahoi87
@biahoi87 5 жыл бұрын
A very informative video, thanks and keep it up. Although I don't get it when you got only one pod running in one worker node #12:44 but you can access nginx index page from both node at browser
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Hi Quan, thanks for watching this video.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Sorry I missed to answer your question. Yes there is only one nginx pod running on one worker node. But you will be able to access the exposed service on any worker nodes as the service is exposed with type "NodePort". If you want to know more about NodePort service type, please check the below link (under the section titled: "Publishing services - service types") kubernetes.io/docs/concepts/services-networking/service/ Thanks, Venkat
@sarankumaark
@sarankumaark 3 жыл бұрын
@@justmeandopensource I am also using the same nodePort but I am able to access the application using only one worker node.. As per my understanding, the container is running in the single node..then how we are getting response from both nodes. Thanks, Saran
@justmeandopensource
@justmeandopensource 3 жыл бұрын
@@sarankumaark The fundamental concept is that you can reach any worker node on nodeport and will be able to reach the service even if the pods are not running on that worker node. Its all possible because of the overlay network. Worker nodes will be able to forward traffic to other nodes where the pods are actually running. If you can access only from the worker node where the pods are running and not from other worker nodes nodeport, then you have some networking problem in your cluster.
@sarankumaark
@sarankumaark 3 жыл бұрын
@@justmeandopensource Thanks for sharing details i will check...keep doing the good thing..wishes from Tamil Nadu🔥🎉
@venugopalkrishna4463
@venugopalkrishna4463 5 жыл бұрын
super
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks for watching this video.
@avijitdhar2807
@avijitdhar2807 4 жыл бұрын
Hi, I am getting "error: unable to recognize "3-init-container.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"" by cluster version is kubectl version --short Client Version: v1.16.0 Server Version: v1.16.1 Could you please tell me what will be the apiVersion I can use. Thanks in advance.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Avijit, I did a video about this. kzbin.info/www/bejne/a2OoomNjedinqac ApiVersion should be apps/v1 Thanks
@vijayakoli5782
@vijayakoli5782 4 жыл бұрын
Hi, can used this init container to lunch jenkins server, so that it can help us to setup CI/CD pipeline
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Vijaya, thanks for watching. I am not sure what you are asking here. Init containers are something that you run to prepare something for your main container. For example, if your main pod needs some data to work, you can have init container fetch that data and keep it ready so that main container when launched will have data ready. The main container will start only when the init container finishes it work successfully. Hope this makes sense. Cheers.
@Bayaprakashreddyc
@Bayaprakashreddyc 4 жыл бұрын
your the best in teaching man, seriously, I have a small doubt, In init YAML file, under init container path for saving HTML is different and under container nginx mount path is different, how do index.html file will copy to the /usr/share/nginx/html , since it's path is /nginx-data
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. It doesn't matter where you mount the volume. But I have used the same volume in both init and nginx containers. I defined a volume in the volume section of the pod. I mounted that volume in init container. Updated the content then mounted the same volume in nginx container under nginx web root.
@Bayaprakashreddyc
@Bayaprakashreddyc 4 жыл бұрын
Thank you
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@Bayaprakashreddyc you are welcome.
@vujanic88
@vujanic88 3 жыл бұрын
does init container must have image specified or we can specify just command that we want to execute?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi thanks for watching. You can't run a container without specifying the image.. Container is basically an image.
@richardwang3438
@richardwang3438 4 жыл бұрын
nice video Venkat, thank you for sharing. Is init container same as pause container or infra container? I know pause container is the first container that gets running in a pod to serve as the basis of the namespace and PID 1.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
HI Richard, thanks for watching this video. I never heard of pause container or infra container. Init containers are not parent containers but the first container to start in a pod. It is used for any preparatory work for your main container. For example, if your main container needs to checkout a file or something for its operation, you can have the init container do that job and when the main container starts, it will have the file ready. You can have more than one init containers. Bear in mind that only when all the init containers execute successfully, the control will then be passed to the main container. If init containers fails for some reason, then main container won't be invoked/started. Cheers.
@richardwang3438
@richardwang3438 4 жыл бұрын
@@justmeandopensource hi, when you run 'docker ps' on any worker node, you can see containers like 'k8s.gcr.io/pause', they are pause containers
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@richardwang3438 Thanks for introducing me to a new concept. I am going to read about it. Cheers.
@richardwang3438
@richardwang3438 4 жыл бұрын
@@justmeandopensource cheers!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@richardwang3438 :)
@shanmugamn789
@shanmugamn789 4 жыл бұрын
Hi nice video, if possible to mount two volumes emtdir in init container section ? We need to mount same volume in two different file path to the main container. I had tried but it's fails. Pls help ....
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Yes, you can mount more than one volumes (of any types) in your pod.
@shanmugamn789
@shanmugamn789 4 жыл бұрын
@@justmeandopensource I tried create mount but it's fails, my requirement is copy two different file from two image. So I used init container but it fails . It possible call two emptdir volume in init container section ?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Yeah. Thats possible.
@shanmugamn789
@shanmugamn789 4 жыл бұрын
@@justmeandopensourcelet me share my code , if possible to share any samples to call two volumes .
@shanmugamn789
@shanmugamn789 4 жыл бұрын
We can use job in place of init container ?
@jahanpanahy
@jahanpanahy 4 жыл бұрын
Hi, First of all thanks for the video. We have some different scenario. We would like to prepare our node before depployment happends. For example we want to install Nvidia drivers because we have application which uses gpu to be deployed on this node of cluster. Is it possible to run script which will install Nvidia drivers before application deployment? Any guidance would be pretty helpful. Thanks again for the video. Keep up the good work.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Hiren, thanks for watching. Where do you want to install nvidia drivers? In the application pod or on the underlying Kubernetes node? If its on the pod, you can either bake it in the container image if its not huge in size or you can use init container to do exactly this. Cheers.
@jahanpanahy
@jahanpanahy 4 жыл бұрын
@@justmeandopensource No, we want to have nvidia drivers installed on the underlying node as it will be having GPU required to run deep learning application. Any ideas there?
@user-ye8zh3ep7m
@user-ye8zh3ep7m 3 жыл бұрын
@@jahanpanahy k8s is not a golden hammer, use ansible, aws cloud formation, chef to provision your infra
@kunafeh
@kunafeh 5 жыл бұрын
It's OK to speak in your native accent. Everyone is able to make out the difference between a fake and real accent.
@justmeandopensource
@justmeandopensource 5 жыл бұрын
Thanks for your comment. I am not trying to impress anyone. My motive is to learn stuff and help the community. For your information, that's my natural accent. If I had focused on the accent, I wouldn't be able to deliver the proper content. That's not my aim. If you cared about the content of the video, you wouldn't have made this comment. Feeling really sorry for you that you had to write this comment.
@romantsyupryk3009
@romantsyupryk3009 4 жыл бұрын
Thanks so much for this tutorial.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Roman, thanks for watching.
[ Kube 13 ] Using Persistent Volumes and Claims in Kubernetes Cluster
44:30
Just me and Opensource
Рет қаралды 36 М.
[ Kube 14 ] Using Secrets in Kubernetes
21:05
Just me and Opensource
Рет қаралды 21 М.
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 11 МЛН
Cool Items! New Gadgets, Smart Appliances 🌟 By 123 GO! House
00:18
123 GO! HOUSE
Рет қаралды 17 МЛН
init containers and side-car containers in kubernetes
22:10
Deekshith SN
Рет қаралды 25 М.
[ Kube 19 ] Performing Rolling Updates in Kubernetes
45:37
Just me and Opensource
Рет қаралды 10 М.
[ Kube 16 ] Using Resource Quotas & Limits in Kubernetes Cluster
33:07
Just me and Opensource
Рет қаралды 10 М.
Cluster API Intro and Deep Dive - Yuvaraj Balaji Rao Kakaraparthi & Vince Prignano, VMware
38:19
CNCF [Cloud Native Computing Foundation]
Рет қаралды 6 М.
Init containers in Kubernetes: examples and use cases
5:58
OutOfDevOps
Рет қаралды 1 М.
[ Kube 8 ] Kubernetes Namespaces & Contexts
17:22
Just me and Opensource
Рет қаралды 24 М.
DaemonSets in Kubernetes
10:39
Pavan Elthepu
Рет қаралды 8 М.
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 11 МЛН