CSDP_Unit 1
CSDP_Unit 1
1. Introduction to Virtualization
• Virtualization is a computing technology that enables multiple operating systems
(OS) or applications to run on a single physical system.
• Though it has gained significant popularity recently, virtualization has been
around for over 30 years.
• It helps in efficiently utilizing hardware resources, reducing costs, and improving
scalability.
Example: A company with 10 physical servers, each running different applications,
can consolidate them into one high-performance server running 10 virtual machines
(VMs). This saves space, power, and hardware costs.
2. Definition of Virtualization
• Virtualization refers to the abstraction of computing resources to allow
multiple guest operating systems (OS) to share a single hardware system.
• The OS running the virtualization software is called the host OS, while the OS
running within the virtual environment is called the guest OS.
Example:
• Windows 10 running inside Oracle VirtualBox on a Linux machine.
• Running Ubuntu as a virtual machine inside Windows using VMware
Workstation.
6. Types of Virtualization
6.1. Client Virtualization
• Virtualization that takes place on a client machine (e.g., laptop, desktop).
• Helps organizations manage large numbers of computers efficiently.
Flavors of Client Virtualization
1. Application Packaging:
o Runs an application in an isolated environment to prevent modification of
system files.
o Uses a sandboxed approach where both the application and virtualization
software are bundled together.
Example: Running Google Chrome inside a sandboxed virtual environment to
prevent malware infections.
2. Application Streaming:
o Applications are stored on a central server and streamed to client
machines.
o Reduces the need for local installations.
Example: Microsoft Office 365 streaming Word or Excel without full installation.
3. Hardware Emulation:
o A virtualization software presents a virtual hardware layer for an OS.
o Allows guest OS to run on an emulated environment.
Example: Running Android OS inside Windows using an Android emulator like
BlueStacks.
8. Storage Virtualization
Storage Virtualization allows multiple physical storage devices to function as a single
virtual unit.
Example: Cloud storage services like Google Drive and Dropbox use storage
virtualization.
Storage Virtualization Techniques
1. Direct-Attached Storage (DAS)
2. Network-Attached Storage (NAS)
3. Storage Area Network (SAN)
Q2: Differentiate between Public, Private, Hybrid, and Multi-Cloud with examples.
Answer:
1. Public Cloud – Services offered by third-party providers over the internet.
o Example: Google Cloud and AWS.
2. Private Cloud – Dedicated infrastructure for a single organization.
o Example: Government organizations using private data centers.
3. Hybrid Cloud – A mix of public and private cloud services.
o Example: A retail company using a private cloud for inventory and a
public cloud for online sales.
4. Multi-Cloud – Using multiple public clouds to avoid dependency on a single
provider.
o Example: A software company using both AWS and Microsoft Azure for
different applications.
Q3: Explain the differences between IaaS, PaaS, and SaaS with examples.
Answer:
1. IaaS (Infrastructure as a Service) – Provides virtualized computing resources
over the internet.
o Example: AWS EC2 (Virtual servers).
2. PaaS (Platform as a Service) – Provides a platform for developing and managing
applications.
o Example: Google App Engine (App deployment platform).
3. SaaS (Software as a Service) – Delivers applications over the internet.
o Example: Dropbox (Cloud storage service).
Docker – In-Depth Notes with Examples and Exam Questions
1. Introduction to Docker
• Docker is an open-source platform that enables developers to automate the
deployment of applications inside lightweight, portable containers.
• It helps to streamline development, testing, and deployment, ensuring that
applications run consistently across different environments.
Example: A developer builds an application on their laptop using Docker. The same
containerized application can be deployed on a production server without compatibility
issues.
3. Docker Architecture
Docker follows a client-server architecture comprising:
1. Docker Client: Sends commands to the Docker daemon.
2. Docker Daemon: Runs on the host machine, manages containers and images.
3. Docker Image: A blueprint for creating containers.
4. Docker Container: A running instance of an image.
5. Docker Registry: Stores and distributes images (e.g., Docker Hub).
Example: A developer pulls an Ubuntu image from Docker Hub, creates a container,
and runs a web server inside it.
4. Docker vs Virtual Machines (VMs)
8. Docker Workflow
1. Pull an image from Docker Hub: docker pull nginx
2. Run a container: docker run -d -p 8080:80 nginx
3. Check running containers: docker ps
4. Stop a container: docker stop <container_id>
5. Remove a container: docker rm <container_id>
Example: Deploying a simple Python Flask application in a container.
3. Kubernetes Architecture
A Kubernetes cluster consists of two main components:
1. Control Plane (Manages the cluster)
o Kube-apiserver: Handles API requests.
o Etcd: Stores cluster data.
o Kube-scheduler: Assigns new workloads to nodes.
o Kube-controller-manager: Ensures desired state (e.g., maintaining the
number of running pods).
2. Worker Nodes (Run applications)
o Kubelet: Ensures containers are running.
o Container runtime: Runs containers (e.g., Docker, containerd).
o Kube-proxy: Handles networking between services.
Example: A Kubernetes cluster with 3 worker nodes running a web application.
4. Key Kubernetes Components
4.1. Pods
• The smallest deployable unit in Kubernetes.
• Can contain one or multiple containers.
• Example: A frontend pod running an NGINX container.
4.2. Services
• Expose applications running inside pods to the network.
• Example: ClusterIP (internal access), NodePort (external access).
4.3. Deployments
• Define the desired state of applications and ensure updates without downtime.
• Example: Rolling updates and rollback of versions.
4.4. Namespaces
• Provide logical isolation of resources.
• Example: Separate development and production environments.
5. Kubernetes Networking
• Each pod gets a unique IP within the cluster.
• Services handle communication between pods and external access.
• Supports Load Balancing and DNS-based service discovery.
Example: A web application with frontend, backend, and database pods
communicating via services.
Q2: What are Kubernetes Pods, Services, and Deployments? Explain with
examples.
Answer:
1. Pods:
o The smallest deployable unit.
o Example: A pod running a Redis container.
2. Services:
o Expose applications running in pods.
o Example: A NodePort service exposing a frontend app.
3. Deployments:
o Manage application scaling and updates.
o Example: A rolling update of a Django app without downtime.