How to create Azure Kubernetes Service (AKS)?

Posted on January 18, 2023
kubernetesazurecontainerizedaks

Here are the basic steps for using AKS:

Create an Azure account: You will need an Azure account to use AKS. You can sign up for a free trial at azure.com.

Create an AKS cluster: Use the Azure portal or Azure CLI to create an AKS cluster. You will need to specify the number of nodes and the size of the nodes.

Following are steps in AKS

Enter the keyword aks in the search bar at the top of the Azure portal. Click on Kubernetes services under the Services category in the search results:

Azure portal

Go ahead and create a new cluster by hitting the + Add button, and selecting the + Add Kubernetes cluster option:

Create Cluster

Click Create new, give your resource group a name, and hit OK.

Resource group

Next, select the region and change the node count to 2 based on Node Size Standard DS2 v2

change the node count to 2 based on Node Size Standard DS2

Hit the Review + create button to do a final review and create your cluster

Accessing your cluster using Azure Cloud Shell

Once the deployment is completed successfully, find the small Cloud Shell icon near the search bar. The portal will ask you to select either PowerShell or Bash as your default shell experience. As we will be working mainly with Linux workloads, please select Bash

Azure Cloud Shell

If this is the first time you have launched Cloud Shell, you will be asked to create a storage account; confirm and create it:

To get the required credentials to access your cluster, you need to type the following command:

az aks get-credentials \
--resource-group rg-tutorial-purpose \
--name aks-tutorial-purpose

To verify that you have access, type the following:

kubectl get nodes

The output of the kubectl get nodes command

kubectl get nodes

You have learned the basics of containers and Kubernetes and set up a Kubernetes cluster on Azure

Follow another article for Deployment with Kubernetes with sample example

Thanks for reading!


Posted on January 18, 2023
Profile Picture

Arun Yadav

Software Architect | Full Stack Web Developer | Cloud/Containers

Subscribe
to our Newsletter

Signup for our weekly newsletter to get the latest news, articles and update in your inbox.

More Related Articles