Azure Kubernetes Service (AKS) manages your hosted Kubernetes environment, making it quick and easy to deploy and manage containerized applications.
Create AKS cluster using Azure Portal
Sign in to the Azure portal at https://portal.azure.com. If you don’t have an account, sign up for free tier. You will get $ 200 credit with 1-month validity.
Step 1: In the top search bar, search with AKS and click on “Kubernetes Service” and click on “Add”
Step 2: To create an AKS cluster, complete the following steps:
- Basics – Configure the following options:
- PROJECT DETAILS
- CLUSTER DETAILS
- SCALE
2. Authentication: Configure the following options:
- Create a new service principal or Configure to use an existing one.
- Enable the option for Kubernetes role-based access controls (RBAC). These controls provide more fine-grained control over access to the Kubernetes resources deployed in your AKS cluster.
Step 3: Select Review + create and then Create when validated successfully.
It will take some to provision AKS cluster for you. Once deployment completed, click on “Go to resources”.
It will take you to the AKS clusters page.
Step 4: Connect to the cluster
Cloud shell is pre-loaded with kubectl. Open cloud shell using the button on the top right-hand corner of the Azure portal.
To configure kubectl to connect to your Kubernetes cluster, use the az aks get-credentials command.
$ az aks get-credentials --resource-group GetStart --name my-cluster
To verify the connection to your cluster, use the kubectl get command to return a list of the cluster nodes.
$ kubectl get nodes NAME STATUS ROLES AGE VERSION aks-agentpool-74406193-0 Ready agent 4m52s v1.12.5 aks-agentpool-74406193-1 Ready agent 5m9s v1.12.5 aks-agentpool-74406193-2 Ready agent 5m3s v1.12.5
Now your cluster is ready to deploy your application.