Understand the core components and architecture of Azure Kubernetes Service.
Introduction to AKS
Azure Kubernetes Service (AKS) simplifies deploying, managing, and operating Kubernetes on Azure. It offloads the management of the control plane to Azure, allowing you to focus on your containerized applications.
Core AKS Components
AKS leverages the open-source Kubernetes project and integrates it with Azure services. Key components include:
1. Control Plane
The Kubernetes control plane is responsible for managing the cluster's state. In AKS, this is a highly available, managed service provided by Azure. It consists of:
API Server: The central point of interaction for managing AKS resources.
etcd: A distributed key-value store that holds the cluster's configuration data.
Scheduler: Determines which nodes pods should run on.
Controller Manager: Runs controllers that regulate the cluster's state.
You do not pay for the AKS control plane. It's managed by Azure and includes capabilities like auto-scaling, upgrades, and health monitoring.
2. Node Pools
Node pools are groups of virtual machines (VMs) within an AKS cluster that run your containerized applications. Each node pool has a specific VM size, OS image, and count.
Agent Nodes: These are the worker nodes where your application pods are deployed.
System Node Pools: Reserved for AKS system pods (like kube-proxy, CNI plugins, CoreDNS). These are typically not user-managed and have specific requirements.
User Node Pools: Where your application pods are scheduled. You can have multiple user node pools for different workloads.
AKS supports Linux and Windows node pools. You can configure scaling, OS types, and VM sizes for each node pool.
3. Pods
A pod is the smallest deployable unit in Kubernetes. It represents a single instance of a running process in your cluster and can contain one or more containers.
Containers within a pod share network namespace, IP address, and storage volumes.
Pods are ephemeral; they are not designed to be long-lived.
4. Deployments and ReplicaSets
While pods are the basic unit, you typically manage them through higher-level abstractions:
ReplicaSet: Ensures that a specified number of pod replicas are running at any given time.
Deployment: A more powerful object that allows you to declare desired state for your applications. Deployments manage ReplicaSets and provide declarative updates, rollback capabilities, and scaling.
5. Services
Services provide a stable network endpoint to access a set of pods. They abstract away the underlying pod IPs, which can change.
ClusterIP: Exposes a service on an internal IP address, making it reachable only from within the cluster.
NodePort: Exposes a service on each Node's IP at a static port.
LoadBalancer: Exposes a service externally using an Azure Load Balancer.
6. Ingress
For HTTP and HTTPS routing to services within the cluster, Kubernetes uses an Ingress controller. AKS provides managed Ingress controllers, often leveraging Azure's Application Gateway or other solutions.
AKS Architecture
The AKS architecture is designed for high availability and scalability:
Managed Control Plane: Azure manages the Kubernetes API server, etcd, and other control plane components, ensuring their uptime and availability.
Virtual Machine Scale Sets: Node pools are typically implemented using Azure Virtual Machine Scale Sets, enabling automatic scaling of your compute capacity.
Azure Networking: AKS integrates with Azure Virtual Network (VNet), Azure Load Balancer, and Azure Application Gateway for robust networking capabilities.
Azure Storage: Persistent data can be stored using Azure Disk Storage or Azure Files.
Key Takeaway: AKS abstracts away the complexity of managing Kubernetes infrastructure, allowing you to focus on building and deploying your applications efficiently.
Next Steps
Explore the following topics to deepen your understanding: