Creating an Azure Kubernetes Service (AKS) Cluster: A Step-by-Step Guide
Last updated
Last updated
Azure Kubernetes Service (AKS) simplifies Kubernetes management tasks, making it easier to deploy, manage, and scale containerized applications using Kubernetes. In this guide, weโll walk through the process of creating an AKS cluster.
An Azure account. If you donโt have one, you can
Open your web browser and navigate to the .
Sign in with your Azure account credentials.
In the Azure Portal, click on โCreate a resourceโ from the left-hand menu.
Search for โResource groupโ and select โResource groupโ from the results.
Click the โCreateโ button.
Enter a unique name for your resource group, such as โRKAKSClusterRGโ
Choose a region for the resource group (e.g., UAE North).
Click the โReview + createโ button and then click โCreateโ to create the resource group.
In the Azure Portal, click on โCreate a resourceโ again.
Search for โKubernetes Serviceโ and select โKubernetes Service (AKS)โ from the results.
Click the โCreateโ button to start the AKS creation wizard.
In the โBasicsโ tab of the AKS creation wizard:
Choose your Azure subscription.
Select the resource group created before (โRKAKSClusterRGโ).
Enter a unique name for your AKS cluster (e.g., โRKAKSClusterโ).
Choose the region for your AKS cluster (e.g., UAE North).
Select the desired Kubernetes version (e.g., 1.30.6).
2. Cluster Preset Configuration
For practice purposes and development/testing tasks, select a cluster preset configuration that suits your needs, such as โDev/Test.โ
This preset can provide you with predefined configurations optimized for these scenarios.
3. Availability Zones
Specify the availability zones where your cluster nodes will be placed for increased resiliency.
4. AKS Pricing Tier
AKS offers two pricing tiers for the managed Kubernetes control plane. Choose the pricing tier that best meets your needs.
5. Automatic upgrade Type:
Choose an upgrade type to determine when the cluster will be upgraded based on new AKS and Kubernetes releases. (For example, you can choose โEnable with Patchโ for recommended automatic upgrades.)
6. Authentication and Authorization:
For authentication and authorization, you can choose to use local accounts with Kubernetes RBAC. This provides a native Kubernetes RBAC managed locally within your AKS cluster.
Click โNext: Node Poolsโ to proceed.
You can add or customize node pools based on your application requirements.
Define the number of nodes, VM size, and other settings for your node pool.
Click agentpool and customize
Click โNext: Networkingโ when youโre ready to proceed.
Configure the networking settings for your AKS cluster. The default settings are usually sufficient for most use cases.
Configure integrations with Azure services and features.
You can enable Azure Container Registry integration, Azure Policy, and more.
Click โNext: Monitoringโ when youโre done.
Enable monitoring if you want to use Azure Monitor and Azure Log Analytics for cluster monitoring and diagnostics.
Click โNext: Securityโ when youโre done.
Click โNext: Advancedโ when youโre done.
Click โNext: Tagsโ when youโre done.
Add tags to your AKS cluster for better organization and management.
Click โReview + createโ when youโre done.
Review all the configuration settings to ensure they are correct.
If everything looks good, click the โCreateโ button to start the provisioning of the AKS cluster.
Import-AzAksCredential -ResourceGroupName RKAKSClusterRG -Name RKAKSCluster
kubectl get nodes
Store front: Web application for customers to view products and place orders.
Product service: Shows product information.
Order service: Places orders.
Rabbit MQ: Message queue for an order queue.
Create a file named aks-store-quickstart.yaml
and copy in the following manifest:
If you create and save the YAML file locally, then you can upload the manifest file to your default directory in CloudShell by selecting the Upload/Download files button and selecting the file from your local file system.
kubectl apply -f aks-store-quickstart.yaml
kubectl get pods
Once the EXTERNAL-IP address changes from pending to an actual public IP address, use CTRL-C
to stop the kubectl
watch process.
Open a web browser to the external IP address of your service to see the Azure Store app in action.
Quickly switch between identites when using AKS with Azure AD integration
Node Pool Management
Reboot a node
kubectl get all
kubectl get namespaces
kubectl get configmaps
kubectl get nodes
kubectl get pods
kubectl get rs
kubectl get pods --show-labels
To deploy the application, you use a manifest file to create all the objects required to run the . A defines a cluster's desired state, such as which container images to run. The manifest includes the following Kubernetes deployments and services:
For a breakdown of YAML manifest files, see .
Deploy the application using the command and specify the name of your YAML manifest.
Check the status of the deployed pods using the command. Make all pods are Running
before proceeding.
Check for a public IP address for the store-front application. Monitor progress using the command with the --watch
argument.