Cloud and Virtualization
Cloud Computing and Virtualization: VMs, Containers, and Cloud Platforms
Cloud computing delivers computing resources over a network on demand, typically billed by use. Virtualization runs multiple isolated operating systems on shared hardware. Containers package an application and its dependencies into a portable unit that runs on a shared OS kernel. Together, these technologies underpin modern infrastructure from small startups to large enterprises.
Cloud service models: IaaS, PaaS, and SaaS
Infrastructure as a Service (IaaS) gives you virtual machines, storage, and networking without the physical hardware. You manage the operating system and everything above it; the provider manages the data center, physical servers, and hypervisors. Amazon EC2, Azure Virtual Machines, and Google Compute Engine are IaaS examples. Platform as a Service (PaaS) adds a managed runtime environment: you deploy code and the provider handles OS patching, scaling, and the underlying infrastructure. AWS Elastic Beanstalk, Azure App Service, and Google App Engine are PaaS examples.
Software as a Service (SaaS) delivers a fully managed application over the internet; you use the software but manage nothing underneath it. Microsoft 365, Google Workspace, and Salesforce are SaaS. A fourth model, Function as a Service (FaaS) or serverless computing, runs individual functions in response to events and charges only for the compute time consumed. AWS Lambda, Azure Functions, and Google Cloud Functions are the major implementations.
Virtual machines and hypervisors
A virtual machine (VM) is a software emulation of a complete computer, including virtualized CPU, RAM, storage, and network interfaces. A hypervisor manages the hardware resources and presents isolated virtual hardware to each VM. Type 1 hypervisors (VMware ESXi, Microsoft Hyper-V, KVM) run directly on bare metal and are used in data centers and cloud platforms. Type 2 hypervisors (VirtualBox, VMware Workstation) run as applications on a host OS and are common for development and testing.
VMs provide strong isolation because each one runs its own kernel. This makes them suitable for running mixed workloads, testing operating system configurations, and isolating services with different security requirements. The tradeoff is overhead: each VM runs a full OS, consuming RAM, CPU, and storage for the OS itself in addition to the application. Booting a VM takes longer than starting a container, and dense VM deployments require significant RAM.
Containers and Docker
Containers package an application together with its libraries and dependencies into a portable image that runs on a shared host OS kernel. This makes containers lighter and faster than VMs: they start in seconds rather than minutes and consume far less overhead per workload. Docker is the most widely used container runtime and image format. A Dockerfile describes the steps to build an image; docker run instantiates a container from that image.
Containers achieve isolation through Linux kernel features: namespaces restrict what a container can see (its own process tree, network interfaces, file system), and cgroups limit how much CPU and memory it can consume. Because containers share the host kernel, a kernel vulnerability affects all containers on the host, which is one reason VMs are still preferred for certain multi-tenant or high-security workloads. Container images should be kept minimal and regularly rebuilt to incorporate security patches.
Kubernetes and container orchestration
Kubernetes (K8s) is an open-source container orchestration system that automates the deployment, scaling, and management of containerized applications. It groups containers into Pods (the smallest deployable unit), schedules them across a cluster of Nodes, and manages their lifecycle. Services provide stable network endpoints for groups of Pods. Deployments define the desired state (how many replicas of which image) and Kubernetes continuously reconciles actual state toward it.
Cloud providers offer managed Kubernetes: Amazon EKS, Azure AKS, and Google GKE handle the control plane, while you manage worker nodes and workloads. The learning curve for Kubernetes is steep, but the core concepts (Pods, Deployments, Services, ConfigMaps, Secrets, Ingress) are consistent across all environments. Kubernetes has become the standard infrastructure platform for microservices architectures.
Key concepts
- + IaaS/PaaS/SaaS: Three service models: manage the OS yourself (IaaS), deploy code to a managed runtime (PaaS), or just use the app (SaaS).
- + Hypervisors: Type 1 runs on bare metal (ESXi, Hyper-V, KVM); Type 2 runs on a host OS (VirtualBox, Workstation).
- + Containers vs VMs: Containers share the host kernel and are lighter; VMs run full OS instances and are more isolated.
- + Docker: The standard container runtime and image format; Dockerfiles define how images are built.
- + Kubernetes: Orchestrates containers at scale; Pods, Deployments, and Services are the core primitives.
- + Shared responsibility model: In cloud, the provider secures the infrastructure; the customer secures data, identities, and configurations.
Frequently asked questions
What is the difference between a public cloud, a private cloud, and a hybrid cloud?
What is infrastructure as code (IaC)?
What is auto-scaling?
What are the main AWS, Azure, and GCP compute services?
Related topics
Reserved for affiliate links to recommended technical books and study guides. Not yet wired.
Reserved for affiliate links to online learning platforms. Not yet wired.
Self-hosted newsletter signup. Not yet wired to an email provider.