What is Azure Kubernetes Service (AKS)?
Azure Kubernetes Service (AKS) is a managed Kubernetes service provided by Microsoft. It allows you to deploy and manage containerized applications without the need to handle the complexities of managing your own Kubernetes clusters. Here are some key points about AKS:
Managed Kubernetes: AKS takes care of critical operations related to Kubernetes, such as health monitoring, maintenance, and scaling.
Minimal Expertise Required: You don’t need extensive container orchestration expertise to use AKS.
Ideal Platform: AKS is ideal for deploying applications that require high availability, scalability, portability, and integration with existing DevOps tools.
Use Cases for AKS
Lift and Shift to Containers:
Migrate existing applications to containers and run them in a fully managed Kubernetes environment.
Benefit from streamlined horizontal scaling, self-healing, load balancing, and secret management.
Microservices Deployment:
Simplify the deployment and management of microservices-based applications.
AKS provides efficient horizontal scaling, load balancing, and secret management for microservices.
Secure DevOps with Kubernetes:
Implement secure DevOps practices by using AKS.
Balance speed and security effectively.
Bursting from AKS with ACI:
Use virtual nodes to provision pods inside Azure Container Instances (ACI).
ACI pods start in seconds and scale to meet demand.
Machine Learning Model Training:
- Train machine learning models using large datasets with familiar tools like TensorFlow and Kubeflow.
Benefits Over Azure Virtual Machine (VM)
Automatic Scaling:
Kubernetes (used by AKS) automatically scales applications based on demand.
In a VM environment, scaling can be more complex
Managed Service:
AKS is fully managed by Azure, reducing operational overhead.
VMs require manual configuration and management.
Containerization:
AKS focuses on containerized applications, providing better isolation and resource utilization.
VMs are less optimized for container workloads.
So, why not directly jump in to deploy an application over AKS Service and check out configurations?
Head towards Azure Portal and start creating (deploying) your Kubernetes cluster. Just search Kubernetes Service, and you will get it.
Start by providing your required details in the required sections.
Please arrange your node pool that will help us to manage our workloads.
Setting up the cluster network.
Finally, go ahead with creating your deployment.
Now, let's connect our terminal (local) to this cluster.
az aks get-credentials --resource-group <resource group name> --name <cluster name> --overwrite-existing
This is the general syntax that you can use to connect with the cluster. Make sure you're logged into the Azure CLI already.
Heyy! what? Merged? Yes, we locally always have kube configuration file and that cluster's information is now saved into your local config file. Go ahead with managing the stuffs.
OK! Here we go with the confirmation, as the current context in which we are currently working is
instragram-clone-frontend-cluster
which we created on the portal. This is now available to us locally.Now, here comes the very important step: we need to create a deployment of our application, whose image will be pulled from a container registry. In this tutorial, I am using Dockerhub as a container registry.
Creating a LoadBalancer type service for our application to expose the deployment.
Use kubectl get svc to achieve the External IP for communication.
Requesting the given IP.
So here you've successfully deployed your application using the AKS Service. Make sure to command to deployment and service topic as these helps us to achieve the deployment in the production.