MSDN Documentation

Your trusted source for Microsoft technologies

Introduction to Azure Kubernetes Service (AKS)

Last updated: October 26, 2023

Azure Kubernetes Service (AKS) makes it simple to deploy, manage, and scale containerized applications using Kubernetes on Azure. AKS simplifies Kubernetes lifecycle management by offloading much of the complex work to Azure. You benefit from open-source Kubernetes without the distributed systems expertise or operational overhead.

Key Benefits of AKS

  • Simplified Kubernetes: AKS provides free, managed Kubernetes control plane, allowing you to focus on your applications.
  • Hybrid Cloud Consistency: Build and deploy consistently across Azure, on-premises, and edge environments.
  • Developer Productivity: Quickly provision resources and integrate with Azure developer services.
  • Enterprise Grade: Benefit from Azure's built-in security, reliability, and operational management.
  • Cost-Effective: Optimize costs with autoscaling and intelligent workload placement.

What is Kubernetes?

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery. Kubernetes was originally designed by Google and is now maintained by the Cloud Native Computing Foundation.

Why Use AKS?

Running Kubernetes yourself involves managing complex components like the control plane, etcd datastore, and networking. AKS abstracts these complexities away, providing:

Core Concepts in AKS

Understanding these core Kubernetes concepts is crucial for working with AKS:

Getting Started with AKS

Ready to deploy your first containerized application on AKS? Here are the basic steps:

  1. Create an AKS Cluster: Use the Azure portal, Azure CLI, or Azure PowerShell to provision your cluster.
  2. Deploy Your Application: Use Kubernetes manifests (YAML files) to define your application's Pods, Deployments, and Services.
  3. Access Your Application: Use Kubernetes Services to expose your application to internal or external traffic.

Example: Deploying a Simple Web App

Here's a minimal Kubernetes deployment definition for a simple web application:


apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-webapp-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: my-webapp
  template:
    metadata:
      labels:
        app: my-webapp
    spec:
      containers:
      - name: my-webapp-container
        image: nginx:latest
        ports:
        - containerPort: 80
            

And a corresponding Service to expose it:


apiVersion: v1
kind: Service
metadata:
  name: my-webapp-service
spec:
  selector:
    app: my-webapp
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  type: LoadBalancer
            

For detailed instructions and advanced configurations, please refer to the official Azure Kubernetes Service documentation.

Next Steps

Explore the following resources to deepen your understanding and start building with AKS: