In this new video, I am going to provide you with a bunch of new information on how to use Azure Kubernetes Service with a really simple application. You'll need to have an Azure account to follow along, so sign up for your free Azure $200 in credits and 12 months of services.
Some of the core concepts I want you to be sure to pay attention to are:
- Bash Quickstart for Azure Cloud Shell
- Kubernetes core concepts for Azure Kubernetes Service (AKS)
- Service principals with Azure Kubernetes Service
- Azure Container Registry Documentation
In this video, I created a way for you to understand how to begin using the Azure Kubernetes Service without needing lots of previous experience. I won't be creating the underlying infrastructure for Kubernetes. In this experience, I am electing to give you what is a typical use-case for those who want to deploy an application without managing all the infrastructure.
Kubernetes helps manage service discovery, incorporate load balancing, track resource allocation, scale based on compute utilization, check the health of individual resources, and enable apps to self-heal by automatically restarting or replicating containers.
In this demo video, our application makes use of the tools associated with Azure Kubernetes Service to make deployment simple. Follow along to build a basic "Hello World!" application to help you begin your journey into the world of using Kubernetes. You can download it here on Github.
Create a resource group - just replace the group, select a different location if you'd like to!
az group create --name YOURGROUPNAME --location eastus
Create role based access control credentials
az ad sp create-for-rbac --skip-assignment
Create your AKS cluster with RBAC credentials, replace with your resource group name and a name for your AKS cluster
az aks create --resource-group YOURRESOURCEGROUP --name YOURCLUSTERNAME \
--enable-addons monitoring,http_application_routing \
--kubernetes-version 1.14.3 --generate-ssh-keys \
--service-principal application-id-from-rbac --client-secret client-secret-from-rbac
Get your cluster credentials for
az aks get-credentials --resource-group YOURRESOURCEGROUP --n YOURCLUSTERNAME
az acr create --resource-group YOURRESOURCEGROUP --name YOUR_ACR_NAME --sku Standard
git clone email@example.com:jaydestro/demo-app.git
Build container from repository
az acr build --registry YOUR_ACR_NAME --image demo-app:latest .
kubectl apply -f ./deployment.yaml
Apply loadbalancer service
kubectl apply -f ./loadbalancer.yaml
Get Loadbalancer Service
kubectl get service -l demo-app -w
When you're done, you can delete your resource group easily:
az group delete --resource-group YOURGROUPNAME
or keep your cluster and start learning how to implement a pipeline for CI/CD. You can use tools like Azure DevOps that works with any language or any platform!
Thanks for following along in this video, feel free to leave me comments or reach out on Twitter at @jaydestro. I absolutely love learning along with you all and will continue to build new videos like this to help you learn!
This series of posts document a high-level process to use when planning a modern web application, from project organization, collaboration considerations and tooling choices during development, all the way through deployment and performance strategies.