Introduction Azure Kubernetes Service

Kubernetes was originally developed and designed by engineers at Google. Google was one of the early contributors to Linux container technology and has talked publicly about how everything at Google runs in containers.

Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications.

What is Azure Kubernetes Service (AKS)?


Azure Kubernetes Service is a managed container orchestration service based on the open source Kubernetes system, which is available on the Microsoft Azure public cloud. An organization can use AKS to handle critical functionality such as deploying, scaling and managing Docker containers and container-based applications.

AKS became generally available in June 2018 and is most frequently used by software developers and IT operations staff.

This short video provides a quick introduction to Azure Kubernetes Service.


Kubernetes is the de-facto open source platform for container orchestration but typically requires a lot of overhead in cluster management. AKS helps manage much of the overhead involved, reducing the complexity of deployment and management tasks. AKS is designed for organizations that want to build scalable applications with Docker and Kubernetes while using the Azure architecture.

Azure Kubernetes Service provides resource provisioning, resizing, and refreshing or ondemand in your Kubernetes cluster with no downtime and the best thing about AKS is that it doesn't require deep container orchestration knowledge and experience to manage AKS.

Azure Kubernetes Service (AKS) Benefits : 

  • Efficient Resource Utilization 
  • Application development time is reduced
  • Security and compliance 
  • Rapid Development and Integration 
  • Supports Agile Project Management

Before practical a few azure kubernetes service related terms should be known so that we understand batter.

Cluster

 

Azure Kubernetes Service (AKS) is a managed Kubernetes service that allows you to quickly deploy and manage clusters. In this quickstart, you deploy an AKS cluster using the Azure portal. Run a sample multi-container application using a web interface and a Redis instance on your cluster.

Node

An AKS cluster has at least one node, an Azure virtual machine (VM) that runs the Kubernetes node components and container runtime. The Kubernetes agent that processes the orchestration requests from the control plane along with scheduling and running the requested containers. Handles virtual networking on each node.

Node Pools

A node pool is a group of nodes within a cluster that all have the same configuration. Node pools use a NodeConfig specification. Each node in the pool has a Kubernetes node label, cloud.google.com/gke-nodepool , which has the node pool's name as its value.

Pods

 

A pod represents a single instance of your application. Pods typically have a 1:1 mapping with a container. In advanced scenarios, a pod may contain multiple containers. Multi-container pods are scheduled together on the same node, and allow containers to share related resources.

Services

Kubernetes services connect a set of pods to an abstracted service name and IP address. Services provide discovery and routing between pods. For example, services connect an application front-end to its backend, each of which running in separate deployments in a cluster. Services use labels and selectors to match pods with other applications.

SO let’s Start to create Azure kubernetes Service.

Precondition

 

A Microsoft Cloud Azure account with a subscription.

Step 1 

Log in to your Microsoft Azure account. (https://portal.azure.com)

Step 2

Create Kubernetes Service Go to Home page > Click “Create a resource”>Search in “Kubernetes Service”> click “Create”

Open a new tab for create Kubernetes Cluster 

  • Show the field resource group, create a new Resource group and name the resource        group something like (TestaksRG) and whatever you think of it. 
  • Cluster Details · Kubernetes luster name : Enter cluster name (cluster18
  • Region: Please select a region (Name and Region are Required)

Primary node pool

  • Node Size : select your node size as per your requirement(default: Standard DS2 v2) 
  • Scale method : click Manual 
  • Node count : 3(you can create 100)
  • No changes are required in other tabs. · Click > Review + create

  • After clicking Review + Create, wait a moment. 
  • It can show that the Kubernetes cluster has been deployed. 
  • After deployment is complete, the Kubernetes cluster is ready.

Step 3

Connect to the Azure Kubernetes Cluster.

Go To Home Page Click >> Cloud Shell >> open Black window Like Command prompt >Select Bash

Configure kubectl to connect to your Kubernetes cluster using the az aks get-credentials command. The following command loads the credentials and configures the Kubernetes CLI to use them.

Write Command: az aks get-credentials –cluste18 –resource-group AksTest18

If command Run success so our cluster Merged with AKS.

Use kubectl get to check connectivity to the cluster and return a list of cluster nodes. Type Command : kubectl get nodes 

That show all running Nodes.

To check how many pods and services are running.

Type Command : kubectl get pods ,kubectl get services

Step 4

Deploy Sample Application and Test Let's create a yaml File and then check it’s working ? This yaml File Is Simple Vote app. 

For Create yaml file write command  : code azure-vote.yaml

Then open new Editor copy our yaml code and Save .(for save right hand side click blank space to open menu and click save.)

Deploy the application using the kubectl apply command and specify the name of your YAML manifest: 

Type Command for created : kubectl apply –f azure-vote.yaml 

Wait a minute for creating deployment and service creation. 

Now check our application Pods are created or not. 

Write Command : kubectl get pods

  • Check Kubernetes Services ,when you first check only one service are running but now Check Services kubectl get services you have three services . 
  • One For Kubernetes ,one for our application and one for application Boadbalancer.

  • Now Copy External-IP and Past It on Any Browser. You can show our application is now running.

Maruti Makwana
An Indian, Coach, Learner, Father, Husband, and Friend for a few chosen ones.

Launch your GraphyLaunch your Graphy
100K+ creators trust Graphy to teach online
𝕏
Mentor's TAG 2024 Privacy policy Terms of use Contact us Refund policy