Azure Kubernetes Service (AKS) Concepts

Understand the core components and architecture of Azure Kubernetes Service.

Introduction to AKS Concepts

Azure Kubernetes Service (AKS) simplifies deploying, managing, and scaling containerized applications and microservices using Kubernetes on Azure. This section delves into the fundamental concepts and architectural components that power AKS.

Kubernetes Basics

Before diving into AKS specifics, it's crucial to understand core Kubernetes concepts:

  • Pods: The smallest deployable units in Kubernetes, representing a single instance of a running process in your cluster. A Pod can contain one or more containers.
  • Deployments: Describe the desired state for your applications, allowing you to manage updates and rollbacks.
  • Services: Provide a stable IP address and DNS name for a set of Pods, enabling network access to your applications.
  • Namespaces: Provide a mechanism for isolating groups of resources within a single cluster.

For a comprehensive understanding, refer to the official Kubernetes documentation.

AKS Architecture

AKS abstracts away much of the complexity of managing the Kubernetes control plane. Azure handles the availability and scaling of the control plane nodes. You are only responsible for the data plane (agent nodes).

Note: The Kubernetes control plane (API server, etcd, scheduler, controller manager) is managed by Azure and runs on nodes that are not directly accessible to you.

Key AKS Components

  • Control Plane: Managed by Azure, it includes the API server, etcd datastore, scheduler, and controllers. It exposes the Kubernetes API and orchestrates the cluster.
  • Agent Nodes: Virtual machines managed by you that run your containerized applications. Each agent node runs components like the Kubelet, Kube-proxy, and a container runtime (e.g., containerd).
  • Managed Kubernetes API: The endpoint for interacting with your AKS cluster, typically via kubectl.

Node Pools

Node pools are groups of nodes within an AKS cluster that have the same configuration. This allows you to:

  • Run workloads with different hardware requirements on separate node pools (e.g., GPU-accelerated nodes).
  • Scale specific node pools independently.
  • Manage upgrades for different sets of nodes separately.

An AKS cluster must have at least one system node pool to host critical system pods. You can add additional user node pools for your application workloads.

Networking in AKS

AKS offers flexible networking options to support various application requirements:

  • Kubernetes Network Model: Each Pod gets its own IP address.
  • Azure CNI: Provides a virtual network interface for each Pod, offering greater network policy control and performance.
  • Kubenet: A simpler networking solution that uses a virtual network (VNet) for the cluster and assigns Pod IPs from a defined subnet.
  • Network Policies: Enable you to control traffic flow between Pods.
  • Ingress Controllers: Manage external access to services in the cluster, typically providing HTTP/S routing.
Tip: For most production scenarios, Azure CNI is recommended for enhanced networking capabilities.

Storage in AKS

AKS integrates with Azure Storage to provide persistent storage for your containerized applications:

  • Azure Disks: Provide block-level storage for individual Pods, suitable for single-node access.
  • Azure Files: Offer managed file shares that can be accessed concurrently by multiple Pods, ideal for shared application data.
  • Dynamic Provisioning: AKS can automatically provision Azure Disks or Files based on StorageClass definitions, simplifying storage management.

Security in AKS

Securing your AKS cluster and applications is paramount. Key security features include:

  • Azure Active Directory Integration: Leverage AAD for centralized authentication and authorization of users accessing the Kubernetes API.
  • RBAC (Role-Based Access Control): Grant granular permissions to users and service principals within the cluster.
  • Managed Identities: Allow AKS applications to securely access other Azure resources without managing credentials.
  • Network Security Groups (NSGs): Control network traffic to and from agent nodes.
  • Secrets Management: Securely store and manage sensitive information like passwords and API keys using Azure Key Vault integration.