- I have used Azure Kubernetes Service to deploy my quiz backend.
-
az login
-
az group create --name testResourceGroup --location westus
-
az acr create --resource-group testResourceGroup --name testarch --sku Basic
-
az acr login --name testarch
-
docker tag pranali139/backend:v1.0 testarch.azurecr.io/pranali139/backend:v1.0
-
az ad sp create-for-rbac --skip-assignment
-
az acr show --resource-group testResourceGroup --name testarch --query "id" --output tsv
-
az role assignment create --assignee <appId> --scope <acrId> --role Reader
-
az aks create \ --resource-group testResourceGroup \ --name myAKSCluster \ --node-count 1 \ --service-principal <appId> \ --client-secret <password> \ --generate-ssh-keys
-
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
-
kubectl run quiz-backend --image=testarch.azurecr.io/pranali139/backend:v1.0 --port 3000
-
kubectl expose deployment quiz-backend --type=LoadBalancer --port 3000 --target-port 3000