Skip to content

Containirize dotnet core web Api using Docker, push to Azure Container Registry and deploy to Kubernetes cluster in AKS

License

Notifications You must be signed in to change notification settings

My-Azure-Projects/Deploying-an-Asp.Net-Core-3.0-Web-API-on-AKS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker & Kubernetes Notes

Containirize dotnet core web Api using Docker, push to Azure Container Registry and deploy to Kubernetes cluster in AKS

Pre-requisites

  1. Install docker desktop on windows machine

  2. Install Azure CLI on windows machine

  3. Create Service Principal in Azure AD

  4. Create Azure Container Registry

  5. Configure RBAC in Azure Container Registry (Acrpull) for the Service Principal

Service Principal

  1. az login

  2. az account show

  3. az ad sp create-for-rbac --skip-assignment

Azure Container Registry - Push Docker images

  1. az acr login --name retailcontainerregistry

  2. docker images

  3. docker tag orderservice:v2 retailcontainerregistry.azurecr.io/orderservice:v2

  4. docker images

  5. docker push retailcontainerregistry.azurecr.io/orderservice:v2

Azure Kubernetes Service - Create Kubernetes Cluster & run containers

  1. az aks get-credentials --resource-group rg-cosmos --name retailkubernetescluster

  2. kubectl get nodes

  3. kubectl apply -f .\Deployment.yml

  4. kubectl get deployment

  5. kubectl get pods

  6. kubectl apply -f .\Service.yml

  7. kubectl get services

About

Containirize dotnet core web Api using Docker, push to Azure Container Registry and deploy to Kubernetes cluster in AKS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published