How do I create and configure Azure Kubernetes Services (AKS) with the Azure Portal or Powershell?

Here are the steps to create and configure Azure Kubernetes Service (AKS) using the Azure portal:

  1. Log in to the Azure portal and select “Create a resource”.
  2. Search for “Kubernetes Service” and select “Create”.
  3. Fill in the required details such as the subscription, resource group, AKS cluster name, region, and Kubernetes version.
  4. Under the “Node pools” section, configure the virtual machine size, node count, and scaling options.
  5. Under the “Networking” section, configure the virtual network and subnet settings for the AKS cluster.
  6. Under the “Authentication” section, configure the authentication method for the AKS cluster, such as Azure Active Directory or service principal.
  7. Review the summary and click “Create” to provision the AKS cluster.

Here are the steps to create and configure AKS using PowerShell:

  1. Install the Azure PowerShell module using the following command:




Install-Module -Name Az -AllowClobber -Scope CurrentUser
  1. Connect to your Azure subscription using the following command:




Connect-AzAccount
  1. Create a new resource group using the following command:




New-AzResourceGroup -Name <resource-group-name> -Location <location>
  1. Create a new AKS cluster using the following command:




New-AzAks -ResourceGroupName <resource-group-name> -Name <aks-cluster-name> -NodeCount <node-count> -NodeVmSize <node-vm-size> -Location <location> -KubernetesVersion <kubernetes-version>
  1. Connect to the AKS cluster using the following command:




Connect-AzAks -ResourceGroupName <resource-group-name> -Name <aks-cluster-name>
  1. Verify the AKS cluster configuration using the following command:




Get-AzAks -ResourceGroupName <resource-group-name> -Name <aks-cluster-name>
  1. To deploy an application to the AKS cluster, use the kubectl command-line tool to create and apply Kubernetes manifest files.

These are just some basic examples, and there are many more options and configurations available for AKS using both the Azure portal and PowerShell.

Author: tonyhughes