DEV Community

Mikael Krief
Mikael Krief

Posted on

Introducing AKS Automatic: Simplifying Kubernetes Management on Azure

Managing Kubernetes clusters can be complex, requiring expertise in security, performance tuning, and scalability. Microsoft has recently introduced AKS Automatic, a new feature in Azure Kubernetes Service (AKS) that automates cluster configuration and management. This new capability, currently in public preview, enables developers and DevOps teams to focus on their applications rather than cluster administration.


What is AKS Automatic?

AKS Automatic is a fully managed Kubernetes service that simplifies cluster operations by applying best practices for security, performance, and reliability. With this feature, AKS takes care of infrastructure management, ensuring that clusters are always optimized and running efficiently. This means less manual intervention for operations teams and more time for innovation.

Key Features of AKS Automatic

  • Automated Cluster Scaling
    AKS Automatic dynamically adjusts the cluster size based on workload demands. This eliminates the need for manual scaling, ensuring optimal resource utilization and cost efficiency.

  • Built-in Security Best Practices
    Security is a major concern in Kubernetes environments. AKS Automatic enforces security policies, including network isolation, role-based access control (RBAC), and automatic patching, reducing the risk of vulnerabilities.

  • Optimized Performance
    The system continuously monitors and optimizes cluster performance, adjusting configurations based on workload patterns to maintain high availability and reliability.

  • Simplified Upgrades and Maintenance
    One of the biggest challenges in managing Kubernetes is keeping clusters updated without causing downtime. AKS Automatic handles version upgrades, patches, and maintenance windows, ensuring a seamless experience for developers.

For more details on AKS Automatic, refer to the official Microsoft documentation.


How to Set Up and Test AKS Automatic?

Prerequisites

Before starting, ensure that you have:

  • Azure CLI installed and updated
  • kubectl installed
  • An Azure subscription
  • AKS Automatic feature enabled (as it's currently in preview)

For installation details, visit the Azure CLI documentation and kubectl installation guide.


Step 1: Enable the AKS Automatic Feature

First, install the necessary Azure CLI extension:

az extension add --name aks-preview
az extension update --name aks-preview
Enter fullscreen mode Exit fullscreen mode

Then, register the Automatic SKU Preview feature:

az feature register --namespace Microsoft.ContainerService --name AutomaticSKUPreview
Enter fullscreen mode Exit fullscreen mode

Check the feature status:

az feature show --namespace Microsoft.ContainerService --name AutomaticSKUPreview
Enter fullscreen mode Exit fullscreen mode

Once the status changes to "Registered", refresh the provider registration:

az provider register --namespace Microsoft.ContainerService
Enter fullscreen mode Exit fullscreen mode

For more details on enabling preview features, check this guide.

Step 2: Create a New AKS Automatic Cluster

Now, create a resource group:

az group create --name myResourceGroup --location eastus
Enter fullscreen mode Exit fullscreen mode

Deploy a new AKS Automatic cluster:

az aks create \
    --resource-group myResourceGroup \
    --name myAKSAutomaticCluster \
    --sku automatic \
    --generate-ssh-keys
Enter fullscreen mode Exit fullscreen mode

This will provision an AKS cluster with automatic management.

Step 3: Connect to the Cluster

Once your cluster is ready, connect to it using az cli and kubectl:

az account set ....
az aks get-credentials --resource-group myResourceGroup --name myAKSAutomaticCluster
kubelogin ....
Enter fullscreen mode Exit fullscreen mode

Verify the cluster nodes:

kubectl get nodes
Enter fullscreen mode Exit fullscreen mode

You should see nodes automatically provisioned and ready for workloads.

Step 4: Deploy a Sample Application

To test the cluster, deploy a sample Nginx application:

kubectl create deployment nginx --image=nginx
Enter fullscreen mode Exit fullscreen mode

Expose the deployment via a LoadBalancer:

kubectl expose deployment nginx --port=80 --target-port=80 --type=LoadBalancer
Enter fullscreen mode Exit fullscreen mode

Check the status:

kubectl get services
Enter fullscreen mode Exit fullscreen mode

After a few moments, an external IP should be assigned to your service. You can then access it via a web browser.

Step 5: Test Auto-Scaling

AKS Automatic supports automatic scaling, so let’s test it.

Scale the deployment to 10 replicas:

kubectl scale deployment nginx --replicas=10
Enter fullscreen mode Exit fullscreen mode

Check the pod distribution:

kubectl get pods -o wide
Enter fullscreen mode Exit fullscreen mode

AKS Automatic should automatically adjust node count based on demand. To monitor this, use:

kubectl get nodes
Enter fullscreen mode Exit fullscreen mode

Over time, AKS Automatic will optimize resource usage and scale the cluster accordingly.
For more information, see the AKS Auto-Scaling documentation.

Step 6: Monitor and Test Performance

To monitor the cluster, enable Azure Monitor for Containers:

az aks enable-addons --resource-group myResourceGroup --name myAKSAutomaticCluster --addons monitoring
Enter fullscreen mode Exit fullscreen mode

Then, check the logs and metrics in the Azure Portal under the "Monitor" section.

For a full documentation on AKS monitoring, see Azure Monitor for Containers.

Final Thoughts

AKS Automatic is a game-changer for teams looking to simplify Kubernetes management while ensuring security and performance. By leveraging this new feature, organizations can streamline their DevOps workflows and accelerate application deployment without the operational burden of managing Kubernetes clusters.

Would you like a hands-on tutorial or a demo on AKS Automatic? Let us know in the comments!

For the latest updates and in-depth information, visit the official Azure Kubernetes Service documentation.

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

If this post resonated with you, feel free to hit ❀️ or leave a quick comment to share your thoughts!

Okay