Lecture 47 "Containers Container based Virtualization Kubernetes Docker Container "
Estimated read time: 1:20
Learn to use AI like a Pro
Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.
Summary
In this lecture, we explore the ever-evolving landscape of cloud computing through the lens of container-based virtualization, focusing on popular platforms like Kubernetes and Docker. The discussion unravels the advantages and challenges of adopting containerization, highlighting how containers pack code and dependencies together to ensure seamless, cross-platform execution. Additionally, the lecture explains the intricacies of resource sharing, scalability, and application isolation that are pivotal in today's IT world. By leveraging containers, developers can achieve efficient operations and agile development cycles, making containers a cornerstone of modern cloud strategies.
Highlights
Containers encapsulate the entire runtime environment, including app dependencies, libraries, and settings 🎁.
Kubernetes is an open-source platform that automates deployment, scaling, and management of containerized applications 🌐.
Docker simplifies the creation, deployment, and running of containers and has become an industry standard 🐋.
Containers are platform-agnostic, running smoothly on any environment, be it a cloud service, local machine, or data center 🌎.
The lightweight nature of containers allows for better resource utilization and efficiency, compared to traditional VMs 💡.
Key Takeaways
Containers revolutionize software deployment by packaging apps with all dependencies for consistent, cross-platform execution 🚀.
Kubernetes and Docker are pivotal tools in containerization, each offering unique features for managing containerized apps 📦.
Container-based virtualization is lighter than traditional VMs, enabling faster and more efficient deployment ⚡.
Using containers, developers can achieve agile development cycles and efficient resource utilization 🌐.
Containers provide clear separation of responsibilities, making life easier for developers and IT operations 🤝.
Overview
The lecture opens by introducing the concept of containers, likening them to physical shipping containers that encapsulate everything needed for transport and usage at their destination. This analogy helps illustrate how containerization in IT allows software to be transported across diverse environments while maintaining consistent performance.
During the session, Docker and Kubernetes are presented as leading open-source tools that have become pivotal in the industry for shipping and managing containerized applications. Docker is emphasized for its ability to create and run containers seamlessly, while Kubernetes provides a platform for automating the deployment, scaling, and operation of app containers.
Finally, the lecture discusses the benefits of container-based virtualization over traditional virtualization techniques. Containers are noted for their lightweight nature, which facilitates better efficiency and portability, thereby enabling developers to focus on application logic while IT operations concentrate on deployment management. This separation of concerns ultimately fosters a more agile development environment.
Chapters
00:00 - 05:00: Introduction to Containerization The chapter begins with an introductory segment on the importance of containerization in the context of cloud computing. Containerization services are highlighted as a key component within this domain. The chapter aims to delve into various aspects and functionalities of containers, setting the stage for a broader discussion on cloud computing's reliance on these technologies.
05:00 - 10:30: Concept of Containers in IT The chapter discusses the shift towards containerization services in the IT world. It highlights that while there are numerous advantages to this approach, there are also challenges. The chapter serves as an overview of these aspects, with a subsequent lecture planned to provide a demo of container implementation.
10:30 - 15:00: Open Source Implementations: Kubernetes and Docker Containers and open source services are discussed with a focus on Kubernetes and Docker. The chapter introduces the concepts and sets the stage for a series of lectures involving demos to show practical applications. The content hints at a deeper dive into how these technologies work and their deployment to meet specific goals.
15:00 - 22:00: Benefits of Containerization The chapter titled 'Benefits of Containerization' delves into the advantages of using containers for transportation and virtualization. It describes how containers are transported via trailers, trucks, and ships, emphasizing their efficiency in moving goods from one location to another. The chapter connects the logistical benefits of physical containers to the context of virtualization, suggesting a parallel in how containers simplify and streamline processes in both physical and digital realms.
22:00 - 30:00: Comparison of Traditional, Virtualized, and Container Deployments This chapter describes deployment techniques: Traditional, Virtualized, and Container. Containers are distinct, self-contained units with defined size and shape, allowing for easy transfer and operation remotely. The main consideration for transferring containers is ensuring compatibility and fit with existing systems, regardless of contents.
30:00 - 37:00: Containers vs Virtual Machines This chapter discusses the differences between containers and virtual machines (VMs), using metaphors to highlight their efficiency and adaptability. Containers are likened to standardized shipping containers, which can fit on various transportation vehicles like trucks or ships, emphasizing ease of transfer and handling. Similarly, containers in computing allow for lightweight and portable application deployment compared to VMs, which are heavier and less flexible. The text underscores the efficiency of containers in various environments due to their design, just as standardized containers streamline logistics in transportation.
37:00 - 48:00: Overview of Kubernetes The chapter explores the concept of containerization within the realm of Kubernetes. It discusses the benefits of container-based applications, particularly emphasizing the interoperability they provide. The content conveys how containers allow for self-contained environments, reducing the need for external dependencies when transporting applications. The narration introduces the fundamental ideas of how Kubernetes manages these containers, although it uses a fragmented conversational style to illustrate the explanations.
48:00 - 53:00: Overview of Docker This chapter provides an overview of container technology, specifically focusing on virtualization and popular open source implementations such as Kubernetes and Docker. These services are discussed in the context of how they operate as containerized environments.
53:00 - 56:00: Conclusion In the conclusion, the focus is on virtualization, emphasizing its role in resource sharing. The chapter summarizes the shift from traditional server-based systems to modern virtualized environments where multiple applications share resources efficiently. The core idea is that virtualization enhances resource management and optimizes application hosting.
00:00 - 00:30 [Music] [Music] hello ah so to we will continue our discussion on cloud computing today we will be talking on or discussing on container or container services or containerization services which are referral this is a important component and if we see in
00:30 - 01:00 today's world or today's i t world the overall whole a major majority of the things is moving towards this containerization services right there are lot of ah advantages as well as challenges ah in this sort of mechanisms and so we will today we will have a overview of the thing and then in the subsequent lecture rather we are planning to have a ah show you a demo of ah how to antenna can
01:00 - 01:30 be deployed to achieve a particular goal and how how things works actually right using open source services right so not today but in this ah series of ah two three ah lectures one small one small demo will will show you right so this is ah and when we talk about container which comes into our mind is ah the
01:30 - 02:00 this big ah container which are being carried by this trailer or the trucks and which are being shipped over from one place to another put on the ship right and taken to one place to another right the the beauty or the or the overall mechanism of this container will come to the in context of virtualization is that when you look at it it looks
02:00 - 02:30 as a as a box right it is a it is a box which has a definite size and shape and inside whatever is there it is some sort of a self content right so it is carried to the other place and it can be opened or explored at the other place and work on the things right so what is what it matters when you transfer ah this container is that you need to take care that it should fit into the things whether it does not matter whether you are transferring food
02:30 - 03:00 grains or say four wheeler vehicles two wheeler vehicles or anything but so long it is fitting into the things definitely the size of the container is ah is made such a way that it fits over this ah large trucks it fits over ah it sits in the carrier of the this ships or it can be it has the crane mechanisms which can hold up to the the type of container it goes on
03:00 - 03:30 definitely there are other constraint like weight and etcetera but nevertheless this this type of content container based things what what is achieved that a large scale of interoperability you do not bother that what is there what we are expecting that whatever is there inside is self-contained we do not have to give anything extra in any transport so anyway that is that is the thing which we are having in our common things and we try to see that how things works in this context right so what will ah
03:30 - 04:00 see today is more of a container and ah that virtualization and container and things like that ah overview of popular open source implementation like kubernetes and docker ah services right so that will try to look at when we see this type of services so basically ah container and ah if you look at this
04:00 - 04:30 virtualization these are the keywords so ah if we if we just have a brief overview or introduction to the thing so so what we have seen this virtualization helps in sharing resources so initially what we are having that server based systems where you are running more than one ah applications right and then they the resources are shared
04:30 - 05:00 and if a application is a resource hungry other may be starved of the resources and those type of scenario from there what we seen that this virtualization why where we still have that infrastructure back in infrastructure it may be a one server or a cluster and then we have different virtual machine um virtual machine may have their own os right they are having their own ways over there things runs over the thing so virtualization what it helped in share resources among many ah
05:00 - 05:30 customer of cloud computing right so that is that is one of the things what we already seen right so what when you talk about container it is a lightweight virtualization technique so it is it is basically a virtualization technique so there are ah similarity in that context and its a lightweight technique right unlike our virtualization it takes ah its payload or the overall footprint is ah much
05:30 - 06:00 lighter right so container packages what it tries to do packages the code right whatever the code you are writing and all is dependency so the application runs quickly and reliably from one computing environment to other right so it is it packages everything right what you are talking about when at the beginning of this lecture that when we talk about this ah [Music] what we say container in our real life that physical container right what we see
06:00 - 06:30 running over the highways etcetera by large trailer and trucks so what we see that is that is everything is packaged inside right all whatever is required it is packaged inside so whether you are taking it to a truck or ship or in some other things it all it matters that overall its safe size and weight right other things are self content so here also ah a container packages all codes and all its dependency so the application run
06:30 - 07:00 quickly and reliably from one computing environment to another so it does not matter whether it is running in linux based system you are putting into a windows based system to some other flavor of linux or mac etcetera ideally it should not matter right so it is it is self contained type of things so two popular ah implementation or popular open source ah things what we are having are heavily used one is the docker is an open platform for developing shipping and
07:00 - 07:30 running applications and kubernetes where is an open source system ah for automatic deployment scaling management of containerized application right so these are two popular things ah rather kubernetes ah evolved from ah means google ah which became open source ah exactly i do not remember somewhere in 2014 or so so so it is now a open source things right
07:30 - 08:00 so containers are packaged packages of software that contain all the necessary elements to run any in any way so we are repeating just to in building our head that it is a self content thing right all dependencies etcetera there so it virtualizes the operating system and run anywhere right practically anywhere from they say that from your own personal pc or laptop to
08:00 - 08:30 ah cloud it it is it can run anywhere right from a private data center to a public cloud or even developers personal laptop it trans ah in the means you do not have to do anything everything is in means ah what we say encompasses in this containers are lightweight packages of the application code together with dependencies such as specific versions of programming language runtimes and libraries required to run the software
08:30 - 09:00 services right so to be more in a formal way so these are lightweight packages of the application code so whatever the application you are trying to run together with the dependency whatever dependency such as a specific version of the programming language ah language run times their libraries etcetera required to run that software services right so that is that is the container it makes is really easy to say as cpu storage and network resources at
09:00 - 09:30 the operating system level and offer a logical packaging mechanism in which applications can be abstracted from the environment which they actually run right so what we are trying so what we are trying to do like virtualization its basically a lightweight virtualization approach only so where like virtualization it now it is easy ah it say our cpu memory storage in a more efficient way and ah doing at the operating system level and
09:30 - 10:00 something local logical packaging mechanisms so it can be from one environment we in which they actually run can be put into the things so as as we as we just told offer a logical packaging mechanism in which application can be abstracted from the environment when which they run actually right so you develop somewhere and how things are there you package it as a ah logical packaging in the things and it can run in that same fashion so this so what we in effect doing this we are
10:00 - 10:30 declare decoupling ah the things right so running of the things and where it need to run this is now can be maintained so what it helps ah container based application to be deployed very easily right because you do not have to break your hand in reconfiguring etcetera and consistently the way it is running in some in one deployment other deployment consistently regardless of whether the target
10:30 - 11:00 environment is your ah a laptop or pc or cloud etcetera so overall what it ah the basic it supports this agile development that is one of the ah need of the things right we require a development from the developer point of view containers allow developers to move ah much more quickly by avoiding concern about the dependency and environments right so it is a ah possible to have agile development efficient operations containers are
11:00 - 11:30 lightweight and allow to use just the computing resources one need this running of the application thus it basically run the application in a very efficient way and run anywhere as we tell that it is a basically ah along with the ah your application all these dependencies etcetera there it virtually runs anywhere ah so whatever platform you are putting um so it if it
11:30 - 12:00 supports this container it supports your the application and of course in ah we we can see that from from the previous discussion ah there are several benefits right one is separation of responsibilities right so we can ah quantization provides ah clear separation of responsibility so it is a so developers focus on ah application logic and dependencies i t operation
12:00 - 12:30 teams focus on deployment management instead of the application details etcetera etcetera so ah so the developer is more concerned about the implementation of the logic where the this other team or the core i t team or deployment team they are more concerned about this the deployment management and then it is ah they are not bothered because once it is containerized they know that things are
12:30 - 13:00 is going to be in this fashion right so what we are if we again come go back to our analogy when we are transporting something over a fixed container over over the truck etcetera the other end that ah [Music] the the shipping company is not actually bothered about what it is coming it it it understands that whatever is there it is self contained and a box of this size and this weight ah is coming right ah of ah say this size and makes this weight
13:00 - 13:30 is coming and we need need to fit it into somewhere right so it is ah so it is they can [Music] work on their domain separately right work load portability another definite another major benefit that container can run virtually anywhere greatly easing development and deployment right
13:30 - 14:00 it can be online acts or different variants of linux it can be on mac it can be on windows so it either on a vm or a physical machine on a developers machine data center on premise and public cloud etcetera so its a enormous portability it keeps which is one of the major challenge in today's world or rather major challenge in it world for from the beginning itself right like if i if i want to transfer a
14:00 - 14:30 application or a bunch of code from one to another then there are serious challenge of portability so it tries to address that issue so highly portable and it becomes very ah what we can say it becomes very extremely useful and when we deploy something at the you want to deploy something at the customer end and where you do not have that experience of ah
14:30 - 15:00 make this tools and packages ah you need to reconfigure at your end the system etcetera right so if you have this sort of a container based services then you do not bother about this you just don't you only bother to how how to house this container and if that that is standard and then you do not bother so once if it is housed things will run right application isolation container ah virtualized cpu memory and network resources at the operating system level
15:00 - 15:30 as we discussed right ah a few minutes ago providing developers with a view of ways logically isolated from the other application right so it gives some sort of a whatever is here it is basically having a ah isolated from other things right so it is it is something which is ah they are on the ah for its own purpose only right again ah
15:30 - 16:00 not a very may not be very good analogy in this case but if i if i think that my container i want to ship something say i have a car company here to ship the cars so i only bothered about that how it fits into the things right right so it is all my things i do not care that whether it is separately transferred how it is transferred ah whether to or how many modes of things are transferred what i am bothered about that how my things will fit ah this thing and how
16:00 - 16:30 means what are the ah way i need to ah deploy that inside that content right so what we see separation of responsibilities ah workload portability and application isolation these are the major things which are are serious challenge right in any any ite industry or deployment of the things so ah if we look at the three pictures so to say so
16:30 - 17:00 this is our traditional deployment still there so or ah maybe slowly we are moving to the ah more of a virtualized world right so this virtualized so in the traditional we have hardware operating system and apps over it right in a virtualized deployment we have that infrastructure of the hardware which can be cluster of systems over there the operating system then the hypervisor or the vmm virtual
17:00 - 17:30 machine monitor and then we have different virtual machines and then run their that guest os on this virtual machines and run applications so initially the hardware which are not shared among the ah resources ah now it is ah properly shared right here also the application share these resources share the hardware resources in traditional but there is no boundary between them appropriate boundary so in that case what will
17:30 - 18:00 happen that ah some ah require more resources may resource hungry application may eat away some of the things which are other disturbing etcetera there are issues of isolation and there are challenges of security and things like that ah those things are there and when we come to the container deployment then we have hardware operating system and the container run time over that we have different containers right so they are self content
18:00 - 18:30 they they what whatever the application etcetera is there so they are self contained and run on this type of things right so this three thing so just to what we discussed this traditional deployment applications run on physical ah servers ah there was no way to define resource boundary for applications in a physical server like this traditional server and then this cause resource allocation issues right
18:30 - 19:00 um as we are telling that some may be eating away more resources than the others and things like that then the next thing is the virtualized deployment allows to run multiple virtual machine on a single physical infrastructure or the physical say machine right one or more ah things so physical surface cpu virtualization allow application to be isolated between the vms because that is there is there are
19:00 - 19:30 isolations it allows better utilization of the resource in a physical server and allows better scalability right so um what one is that application isolation and i can scale scale the things like i require more vm resources then i can migrate and things like that i can do different scalability each vm is a in a sense is a ah full system right required for the ah customer or the running application
19:30 - 20:00 ah running all components include his own operating system on top of virtualized hardware and etcetera etcetera right and the next the next gen sort of thing what we are seeing today or what it is this it world is going towards is the container deployment right container similar to vms in case of virtualizations things like that but they have relaxed isolation property to share the operating system among the applications right there is another part
20:00 - 20:30 so that therefore containers are considered lightweight containers has its own file system share of cpu memory ah process space and more the containers are decoupled from the underlying infrastructure they are portable across different cloud cloud service providers or different os distribution and things like that because as they are ah
20:30 - 21:00 decoupled from the underlying infrastructure so they do not have to be there so this ah things portability is much much ah higher right than v m and rather in case of a traditional portability is a serious challenge so now as ah this containers and vms are going hand in hand so instead of talking telling that containers versus vm let us put it as a
21:00 - 21:30 container and vm like so vm say guest operating system such as linux on windows run on the top of a host operating system so as we have seen in the previous picture so there is a host operating system and hypervisor and there are different guest operating system which runs over that so so underlining host hardware right containers are often compared to virtual
21:30 - 22:00 machines obviously because both ah are virtualization techniques like virtual machine containers allow one ah to package of the applications together so so it allows us to package these applications together with other libraries and dependency providing isolated environment for running the ah software services so what it allows it allows the package the application together with the library is another dependency so it is not ah
22:00 - 22:30 it is it is self contained right and thus providing isolated environment for running the software services so however ah what we see so rather in a sense ah this is also somewhat is also true for other vms but in case of container offer a far more lightweight unit for developers and i t ops team operational team ah to
22:30 - 23:00 work with carry a ah my rate of benefits and etcetera so it is practically if we will compare with the vm one of the thing is that it is extremely lightweight so what if we see containers are much more lightweight than vms that is one thing containers virtualize as the os level while vm virtualize at the hardware level right usually we a virtual machine vms are called as a hardware level where container virtualize at the
23:00 - 23:30 os level container shares the os kernel and use fraction of the memory required right so it use the or exploit that os kernel and use a fraction of the memory vms required so in comparison to the view so that is ah what we see it is a large light weight virtualization technique what we looked at so now let us look at ah to
23:30 - 24:00 popular popular ah overview will look deep into the things in the subsequent ah lectures one is kubernetes right ah quivernets is a portable extensible open source platform for managing contrast workload of services that facilitate both ah declarative configuration and automation so one sentence tells a lot of things right so it is portable extensible open source platform
24:00 - 24:30 for managing quantized workloads and services so it gives help it basically ah able to ah manage containerized services that facilities bought declarative configuration and automation so it it can ah facilitate ah your declarative ah configurations of the things and automation so it has large ah it has a large rapidly growing ecosystem so to say so it is a big thing what is the contribution is
24:30 - 25:00 going on so kubernetes services support tools are widely available so that is widely popular and it is open source so what it says that ah literature says that kubernetes originates from a greek ah from greek meaning ah some ah helps man or pi lot right anyway that is the why the name like that q one is operate at the container level rather than at the hardware level so it provides some ah
25:00 - 25:30 application features common to pass offerings right like platform as a service right where it is higher than the is type of things so some sort of a patch covering such as deployment scaling scaling auto balancing and lets user integrate their logging monitoring and alerting solutions right so it is ah not at the hardware level but can be thought of at a something as a ah pass level however
25:30 - 26:00 ah cuban net is not ah monolithic so that these default solution are optional and pluggable so it is not a monolithic ah structure so these are ah optional and things q1x provides the building block ah for ah building ah developer platform but ah preserves user choice and flexibility where it is important that means it both provide building blocks to
26:00 - 26:30 [Music] for the developers but also ah give a choice flexibility is of the user things right so it say what we say it is a more versatile service which is much lightweight and have their building blocks and also give so we will see little bit of q nets in subsequent lectures so if we look at the kubernetes components so class so when we talk
26:30 - 27:00 about kubernetes installation it provides you a cluster right so kubernetes cluster consists of a set of worker machines call popularly known as nodes that run containerized application so these are the nodes which run every cluster has at least one worker node means there should be any cluster should have only at least one worker node the worker node ah or nodes host the ports that are components of the application worker ah workload right so this ah worker nodes basically holds the
27:00 - 27:30 ports which are basically application workload components right there is a control plane manages the worker nodes and the pods in the cluster so there is a cluster where the worker nodes are there which worker knows host the ports which are the components of the application things and overall things are managed by this control plane which both are converts in the ports so in the production environment the control plane usually run across multiple computers
27:30 - 28:00 and a cluster ah and a cluster usually run multiple nodes right providing fault tolerant and high availability so it is typically in a production environment what we say that the control plane runs our multiple computers and cluster usually run multiple nodes which host ah different ports and it provides a fault tolerant and high availability so this is a big picture ah of the cuban
28:00 - 28:30 nets where this control plane things are there and there are different nodes and ah if you look at there are different other components like scheduler cube proxy ah cube laid etcetera we will will discuss ah those components in subsequent class another popular ah open stored platform is a docker or sometimes called docker container
28:30 - 29:00 so name is something which is which can be docked and docking type of things so what we have seen docker gives a sandbox process that is isolated from all processes on the host machine right so its a [Music] mechanism by which it is isolated from the other processes container is a runtime instant of an image right one can create start ah stop move
29:00 - 29:30 delete a container using ah things like docker api and cl or cli and type of things the container can run can be run on local machine virtual machine clouds and anywhere right that we have already seen so docker ah again we will again we will discuss i like kubernetes with the docker also little bit more so doc what to just to give you an overview ah the docker
29:30 - 30:00 container image is a lightweight standalone executable package right software that includes everything needed to run that things code runtime systems tools dependencies libraries settings etcetera everything right so this is very popular and becomes very handy for easy deployment and things like that so container images become containers at run time right so we have container images which becomes container run time and in case of docker container
30:00 - 30:30 image become containers when they are run on the docker engine so there is a concept of docker engine over which these things runs right so available for both linux and windows application containerized software will always run the same regardless of the infrastructure right so that is the basic ah things what we started with right regardless of the infrastructure it can run anywhere and in the same passion containers isolated software from its
30:30 - 31:00 environment and ensure it works uniformly despite the differences in the operating systems and [Music] and different instances of the development and things like that ok and if we look at that [Music] this docker engine so run on docker this container run on the docker engine
31:00 - 31:30 is standard docker created the industry standard and the containers they could be portable any anywhere right it is lightweight and secure applications are safer in the containers and dockers provide the strongest default isolation capabilities in the industry but the docker they claim that they are a thing nevertheless it ah both this this containers try to provide this isolation application level isolations which helps in ah different
31:30 - 32:00 [Music] what we say securing the application from other applications ok with this ah what we see in today's class ah discussion is that that what is a overview of the container we rather [Music] few lectures or ah sometime in the in the previous discussion we discussed about dockers ah and containers but this
32:00 - 32:30 this time we the in next couple of ah discussions we will be having little going deep into the things and actually want to show you actual deployment of this sort of a container services and how things works ah in this type of environment right so with this let us ah conclude our things there are few references like kubernetes and docker and some from the google cloud ah things so
32:30 - 33:00 you can refer those documents and things like that so ah let us conclude here for our ah this basics of or overview of the container or container based virtualization thank you