How To Create An AKS Cluster with Azure CLI: Step-by-Step Guide

This step-by-step guide will show you how to create an AKS cluster with Azure CLI.

AKS (Azure Kubernetes Services) is a managed Kubernetes service that makes it easy to deploy and manage clusters of Kubernetes nodes. This guide will walk you through the process of creating an AKS cluster, adding nodes to the cluster, and deploying a sample application. Let’s get started!

In the previous post on the topic, we discussed AKS Node pools.

Login to Azure Set Subscription

Before we start, make sure you have Azure CLI installed and you are running the latest version and log in to Azure using the command below.

az login

Creating an AKS Cluster

The first step is to create a new resource group for your AKS cluster. You can do this with the az group create command:

az group create -l westus -n aks

Next, use the az aks create command to create your AKS cluster. This command will create an AKS cluster with one node (standard B2s)

az aks create \
    --resource-group aks \
    --name akscluster01 \
    --node-count 1 \
    --enable-addons http_application_routing \
    --generate-ssh-keys \
    --node-vm-size Standard_B2s \
    --network-plugin azure

The az aks create command will take a few minutes to complete. When it is finished, you will have a new AKS cluster!

About AKS (Azure Kubernetes Services)

AKS (Azure Kubernetes Services) is a managed Kubernetes service that makes it easy to deploy and manage clusters of Kubernetes nodes. AKS is part of Azure and is a great option for managing Kubernetes deployments on Azure.

For more AKS and Azure posts, visit the pages below.

,

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.