Containirize dotnet core web Api using Docker, push to Azure Container Registry and deploy to Kubernetes cluster in AKS
-
Install docker desktop on windows machine
-
Install Azure CLI on windows machine
-
Create Service Principal in Azure AD
-
Create Azure Container Registry
-
Configure RBAC in Azure Container Registry (Acrpull) for the Service Principal
-
az login
-
az account show
-
az ad sp create-for-rbac --skip-assignment
-
az acr login --name retailcontainerregistry
-
docker images
-
docker tag orderservice:v2 retailcontainerregistry.azurecr.io/orderservice:v2
-
docker images
-
docker push retailcontainerregistry.azurecr.io/orderservice:v2
-
az aks get-credentials --resource-group rg-cosmos --name retailkubernetescluster
-
kubectl get nodes
-
kubectl apply -f .\Deployment.yml
-
kubectl get deployment
-
kubectl get pods
-
kubectl apply -f .\Service.yml
-
kubectl get services