Search This Blog

Monday 15 June 2020

Container Deployments - some basic concepts and EKS

I came across AWS's container solutions - EKS. But I realized that to move forward, I actually needed a primer on Containers. The post is a revision on Containerization. I have liberally copied of the Kubernetes Website and from Docker website - as I did my  studies from there.
To start with Containers are a terminology associated with the world of application runtime. We run our applications on physical servers on premise. Or we run it on cloud. So where does the Container model of execution fit in ?
As seen both Container deployment and Virtualized deployment offer significant benefits over the traditional model. The growth of cloud platforms led to increase in popularity of Virtual machines and this kind of an execution environment. Container Deployment is the next stage in this evolution. So what makes Containers popular ?
  1. Virtual machines may take up a lot of system resources of the host machine, being many GBs in size. Running a single app on a virtual server means running a copy of an operating system as well as a virtual copy of all the hardware required for the system to run. This quickly adds up to a lot of RAM and CPU cycles. Containers can be as small as 10MB. This makes containers remarkably lightweight and fast to launch as opposed to deploying virtual machines, where the entire operating system needs to be deployed.
  2. The process of relocating an app running on a virtual machine can also be complicated as it is always attached to the operating system. Hence, you have to migrate the app as well as the OS with it. Also, when creating a virtual machine, the hypervisor allocates hardware resources dedicated to the VM. As Containers are small, you can quickly scale in and out of containers and add identical containers.
This makes the guest OS sound like a bad thing. But it also gives some benefits that containers do not have

  1. Each VM is completely isolated from the host operating system. Containers share the OS, so they are process-level isolated. One container could potentially affect others by compromising the stability of the operating system.
  2. Due to the reduced isolation, containers do not offer the same security and stability that VMs can.
From what I read, Container technology is working on ever improving solutions to minimize the above factors.

But what if we could combine VMs and Containers ?
Consider that we have multiple VMs and we want to deploy containers on each of them. With this approach you get all the container benefits and Virtual machines benefits.

Now that we know the difference between the two, the next question would be what is Kubernetes ?
Kubernetes is a portable, extensible, open-source platform for managing 
containerized workloads and services, that facilitates both declarative 
configuration and automation.
Of course this definition does not explain much. Sounds more like propaganda (It is from the Kubernetes website). From the same website however, this statement is more relevant:

Kubernetes provides you with a framework to run distributed systems
resiliently. It takes care of scaling and failover for your application, 
provides deployment patterns, and more.
Kubernetes is a software that allows you to create containers on a machine and run them. It performs
  • Container management (health checks, container replacement), 
  • efficient utilization of systems(allocating the right containers to right instances based on container memory, CPU requirement), 
  • scaling (load balancer behavior if the container application is a web service), 
  • integration with storage systems,
  •  configuration management etc.

So thats where we stand. How do we combine this with AWS ?

AWS provides Virtual Machines - EC2 instances that we can setup within our AWS account. AWS also provides Kuberenetes - Amazon Elastic Kubernetes Service (EKS)
AWS makes it easy to run Kubernetes. You can choose to manage Kubernetes 
infrastructure yourself with Amazon EC2 or get an automatically provisioned,
managed Kubernetes control plane with Amazon EKS. Either way, you get 
powerful, community-backed integrations to AWS services like VPC, IAM, and
service discovery as well as the security, scalability, and 
high-availability of AWS.

And with this brief knowledge begins my journey into EKS.

1 comment: