Beginner's Guide: How to Deploy a Scalable AKS Automatic Cluster on Azure in 7 Easy Steps
TUTORIAL

Beginner's Guide: How to Deploy a Scalable AKS Automatic Cluster on Azure in 7 Easy Steps

Learn how to deploy a production-ready Azure Kubernetes Service (AKS) Automatic cluster with automated node management, scaling, security, and monitoring in this beginner-friendly step-by-step tutorial.

Beginner's Guide: How to Deploy a Scalable AKS Automatic Cluster on Azure in 7 Easy Steps

Azure Kubernetes Service (AKS) Automatic (preview) simplifies Kubernetes cluster management by automating node provisioning, scaling, upgrades, and security best practices out of the box. This tutorial walks beginners through deploying a production-ready AKS Automatic cluster on Azure, with step-by-step instructions and explanations of key features.


Why Choose AKS Automatic?

AKS Automatic offers an optimized, production-ready Kubernetes experience that handles complex tasks like node management, scaling, and security without manual intervention. It leverages Azure CNI Overlay powered by Cilium for high-performance networking and secure communication, integrates managed NGINX ingress with Azure DNS and Key Vault, and uses a managed NAT gateway for outbound traffic.

Key benefits include:

  • Automatic Node Provisioning and Scaling: Nodes are created and scaled based on workload demands using Node Autoprovisioning.
  • Built-in Security and Maintenance: Clusters have hardened default configurations, automatic upgrades, node auto-repair, and safeguard policies.
  • Integrated Monitoring and Observability: Includes Managed Prometheus, Managed Grafana, and Container Insights for metrics and logging.
  • Streamlined Application Deployment: Supports automated deployments from source control with CI/CD pipeline generation.

Prerequisites

Before you begin:

  • An active Azure subscription.
  • Azure CLI installed and configured.
  • Basic familiarity with Kubernetes concepts.

Step 1: Install Azure CLI and AKS Extensions

Make sure you have the Azure CLI installed. Install the AKS extension to access the latest AKS Automatic features.

az extension add --name aks-preview
az extension update --name aks-preview
az login

Step 2: Create a Resource Group

Create a resource group to organize your Azure resources.

az group create --name myAKSResourceGroup --location eastus

Step 3: Create an AKS Automatic Cluster

Deploy an AKS Automatic cluster. This cluster type manages node pools, networking, security, and scaling automatically.

az aks create \
  --resource-group myAKSResourceGroup \
  --name myAKSCluster \
  --location eastus \
  --kubernetes-version 1.27.3 \
  --enable-automatic-upgrade \
  --network-plugin azure \
  --enable-managed-identity \
  --enable-cluster-autoscaler \
  --min-count 1 \
  --max-count 5 \
  --enable-node-autoprovisioning \
  --node-vm-size Standard_DS2_v2

Explanation:

  • --enable-node-autoprovisioning: Enables AKS Automatic to manage node pools.
  • --enable-cluster-autoscaler with min/max counts ensures nodes scale with workload.
  • --network-plugin azure: Uses Azure CNI Overlay powered by Cilium for secure, high-performance networking.
  • --enable-automatic-upgrade: Enables automatic cluster upgrades.

Step 4: Verify Cluster Deployment

Check the cluster status and node pools.

az aks show --resource-group myAKSResourceGroup --name myAKSCluster
az aks nodepool list --resource-group myAKSResourceGroup --cluster-name myAKSCluster

Use kubectl to interact with your cluster:

az aks get-credentials --resource-group myAKSResourceGroup --name myAKSCluster
kubectl get nodes

Step 5: Deploy a Sample Application

Deploy a simple NGINX application to test the cluster.

kubectl create deployment nginx --image=nginx
kubectl expose deployment nginx --port=80 --type=LoadBalancer
kubectl get service nginx

This exposes the NGINX app with a public IP via the managed NGINX ingress and Azure Load Balancer.


Step 6: Enable Monitoring and Observability

AKS Automatic clusters come with managed Prometheus, Grafana, and Container Insights enabled by default.

To access metrics:

  • Use Azure Portal to navigate to your AKS cluster.
  • Open the Monitoring section to view Prometheus metrics and Grafana dashboards.
  • Use Container Insights for logs and performance data.

Step 7: Plan for Maintenance and Scaling

AKS Automatic handles node repair and upgrades automatically but allows you to configure a maintenance window:

az aks maintenanceconfiguration create \
  --resource-group myAKSResourceGroup \
  --cluster-name myAKSCluster \
  --name myMaintenanceWindow \
  --start-hour 2 \
  --start-minute 0 \
  --time-zone 'Pacific Standard Time'

Scale applications efficiently using Kubernetes autoscalers like Horizontal Pod Autoscaler (HPA), Kubernetes Event Driven Autoscaling (KEDA), and Vertical Pod Autoscaler (VPA), all enabled by default.

Example to enable HPA:

kubectl autoscale deployment nginx --min=1 --max=10 --cpu-percent=50

Conclusion

With AKS Automatic, deploying and managing a scalable, secure Kubernetes cluster on Azure is streamlined and accessible even for beginners. The service automates critical operations such as node management, scaling, upgrades, and monitoring, enabling you to focus on your applications instead of cluster maintenance.

Follow this tutorial to get your first AKS Automatic cluster running and take advantage of Azure's powerful orchestration capabilities with minimal fuss.


For further learning, explore Azure's documentation on AKS Automatic networking, ingress options, workload identity, and advanced scaling features.

Happy Kubernetes journey!