An Overview of Containers
In our previous article we examined some of the most widely used services and cloud products that AWS has to offer. However, with KubeCon just around the corner (article coming soon!), containers, especially those integrated with the Kubernetes platform, are an extremely hot topic. So, let’s take a step back and examine what containers really are, the differences between containers and Virtual Machines (VMs), why the Kubernetes platform has such a large user base, how cloud computing helps companies utilize containers, and why you might choose to use them.
What are Containers?
‘Containers’- a fairly standard word, right? A lot less intimidating than ‘Kubernetes’, at least I’d say. If I asked you to tell me what a container was, with no prior knowledge about computing, you might say a container is something that can hold or store something else and can be used to transport that thing from place to place, like plastic containers for storing food or big metal containers like the ones they carry on cargo ships. And you would be right, both generally and in the computing world as well.
Containers in computing are essentially standard units of software that can be used to package and store code, including all the code’s dependencies, or software that the code relies on to run. By packaging the code in such a manner, Containers make the code much more portable, allowing it to be run on different computing environments with little to no setup required.
Containers are ideal for workloads that require the repetition of smaller tasks, like an application built around microservices, as each task can be containerized and run individually without needing an overarching management architecture. Further, due to the high portability and efficiency of containers, they are also useful for companies with prospects for modernizing their existing software framework, as containers can be easily run on any type of device, from VMs to standard computers to the cloud regardless of their OS. By containerizing their applications, companies can manage their backend infrastructure without worrying about product downtime.
Containers vs VMs – What’s the difference?
Now that you know the basics of containers, you might think they sound a whole lot like VMs, and you wouldn’t be wrong. VMs became popular in the early 2000s in a pre-Docker era as the primary method of emulating multiple physical hardware configurations on one machine. VMs employed a type of software called a hypervisor, or a VM monitor, that enables the creation of VMs. Through this process users were able to stack multiple VMs upon each machine, with each VM storing a unique application, OS, and supporting libraries. However, since each VM requires this supporting software, they tend to take up a lot of space, thus limiting the number of VMs that can be stored on each physical machine.
On the other hand, containers all share the same underlying OS of the machine that they run on and have the capability of sharing dependencies such as supporting libraries, thus drastically reducing the storage size of each container, and allowing for more containers to be stored per host. This ability to share supporting virtual infrastructure also enables containers to have faster startup times than their VM counterparts. However, this speed comes at the price of security. The constant communication of containers with each other can present a security risk not seen in VMs, as each VM contains all its dependencies within itself.
In short, containers and VMs, while serving similar purposes, vary in terms of speed, size and security. Containers may be ideal for DevOps teams who prioritize the speed of their application, its portability, and the ability to run more containerized applications on one server. VMs might be the go-to for workloads that require utmost security, or applications that need to access the full capabilities of the OS.
What is Kubernetes?
While containers are a means of packaging and managing code, Kubernetes is an open-source platform for managing containers and containerized workloads. The platform was first developed by Google engineers and was open-sourced for public use in 2014. The Kubernetes platform provides users with access to a variety of services that help automate manual processes to improve container deployment, scaling and management. Some of these services include automatically restarting or replacing containers that fail, changing the storage destination for data generated by containers, and managing the security of sensitive information like passwords.
The Kubernetes platform also allows you to deploy Kubernetes clusters, which are groups of nodes (in this case physical or virtual computers) that help you run containers. This allows containers to be applied to multiple machines and environments at once, further increasing the high portability that containers already had.
Kubernetes is ideal for all developers and companies using containers as it increases efficiency by automating processes that previously had to be done manually. Kubernetes is also beneficial for workloads that require extensive computing power as Kubernetes clusters can be deployed for spreading and handling the workload across multiple machines at once.
What do Cloud Computing Services Offer?
Now that we’ve understood what containers and Kubernetes are, what do cloud services providers offer to help improve the experience of adopting containerized workloads. In essence, the core ideology behind cloud computing aligns with that of containers. Both services are aimed at maximizing productivity, efficiency and portability while reducing error margins and downtime. As such, containers integrate extremely well with the cloud. By using cloud storage options, containers can readily be deployed without needing to handle server configuration for storage requirements. Containers in the cloud are given their own isolated environment and thus can be updated and changed independently. Many cloud service providers, like Amazon Web Services, Microsoft Azure and Red Hat OpenShift, provide both Containers as a Service and Kubernetes as a Service, allowing for automated and simpler management of containerized applications deployed independently or through the Kubernetes platform.
Since containers integrate so well with the cloud, all companies that are running containerized workloads should look at adopting cloud-based container infrastructure as doing so helps increase productivity and functionality while decreasing management time and resources.