{"id":21165241,"url":"https://github.com/jomit/aks-trials","last_synced_at":"2026-02-09T07:06:27.646Z","repository":{"id":69192968,"uuid":"127347114","full_name":"jomit/aks-trials","owner":"jomit","description":"Tutorials + Sample code around Azure Container Service (AKS)","archived":false,"fork":false,"pushed_at":"2018-04-02T23:17:16.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T21:39:17.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jomit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-29T21:03:02.000Z","updated_at":"2018-04-02T23:17:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"a29f73b8-0749-43fa-ab48-87c7f1f0f20b","html_url":"https://github.com/jomit/aks-trials","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jomit/aks-trials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomit%2Faks-trials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomit%2Faks-trials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomit%2Faks-trials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomit%2Faks-trials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jomit","download_url":"https://codeload.github.com/jomit/aks-trials/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomit%2Faks-trials/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29258627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T14:23:58.248Z","updated_at":"2026-02-09T07:06:27.624Z","avatar_url":"https://github.com/jomit.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tutorials\n\n### Create \u0026 Test Docker Images\n\n- `git clone https://github.com/Azure-Samples/azure-voting-app-redis.git`\n\n- `cd azure-voting-app-redis`\n\n- `docker-compose up -d`\n\n- `docker images`\n\n- `docker ps`\n\n- Browse to [http://localhost:8080](http://localhost:8080)\n\n- `docker-compose stop`\n\n- `docker-compose down`\n\n### Push Docker Images to Azure Container Registry (ACR)\n\n- Install latest [Azure-CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest)\n\n- Need to use Powershell in admin mode to run below commands on Windows due to this [issue](https://github.com/Azure/azure-cli/issues/4843)\n\n- `az group create --name akstrials --location eastus`\n\n- `az acr create --resource-group akstrials --name jomitacr --sku Basic`\n\n- `az acr login --name jomitacr -g akstrials`\n\n- `az acr list --resource-group akstrials --query \"[].{acrLoginServer:loginServer}\" --output table`\n\n- `docker images`\n\n- `docker tag azure-vote-front jomitacr.azurecr.io/azure-vote-front:v1`\n\n- `docker push jomitacr.azurecr.io/azure-vote-front:v1`\n\n- `az acr repository list --name jomitacr -g akstrials --output table`\n\n- `az acr repository show-tags --name jomitacr -g akstrials --repository azure-vote-front --output table`\n\n\n### Create Azure Kubernetes Service Cluster\n\n- `az provider register -n Microsoft.ContainerService`\n\n- `az aks create -g akstrials -n jackaks --node-count 1 --generate-ssh-keys`\n\n- Download `kubectl.exe` and set it in your path\n\n    - https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-via-curl  or \n\n    - `az aks install-cli`\n\n- `az aks get-credentials -g akstrials --n jackaks`\n\n- `kubectl get nodes`\n\n#### Configure ACR permissions for AKS identity\n`\n- `$CLIENT_ID=$(az aks show -g akstrials --n jackaks --query \"servicePrincipalProfile.clientId\" --output tsv)`\n\n- `$ACR_ID=$(az acr show -n jomitacr -g akstrials --query \"id\" --output tsv)`\n\n- `az role assignment create --assignee $CLIENT_ID --role Reader --scope $ACR_ID`\n\n\n#### Deploy Application on AKS\n\n- Update `azure-vote-all-in-one-redis.yaml` file to use the image from ACR `line 47`\n    - `image: jomitacr.azurecr.io/azure-vote-front:v1`\n\n- `kubectl create -f azure-vote-all-in-one-redis.yaml`\n\n- `kubectl get service azure-vote-front --watch`   (wait for EXTERNAL-IP)\n\n- Browse `http://EXTERNAL-IP`\n\n- `kubectl proxy`  (to see the dashboard)\n\n#### Scaling Nodes\n\n- `az aks scale -n jackaks -g akstrials --node-count 3`\n\n#### Scaling Pods\n\n- `kubectl get pods`\n\n- `kubectl scale --replicas=5 deployment/azure-vote-front`\n\n- `kubectl get pods`\n\n#### Autoscaling ([horizontal pod autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/))\n\n- `kubectl autoscale deployment azure-vote-front --cpu-percent=50 --min=3 --max=10`\n\n- `kubectl get hpa`\n\n#### Update Application\n\n- `docker-compose up --build -d`  (update application and rebuild the images)\n\n- `az acr list -g akstrials --query \"[].{acrLoginServer:loginServer}\" --output table`\n\n- `docker tag azure-vote-front jomitacr.azurecr.io/azure-vote-front:v2`\n\n- `docker push jomitacr.azurecr.io/azure-vote-front:v2`\n\n- `kubectl get pod`\n\n- `kubectl set image deployment azure-vote-front azure-vote-front=jomitacr.azurecr.io/azure-vote-front:v2`\n\n- `kubectl get service azure-vote-front`\n\n#### Monitor and Log Analytics\n\n- Setup [Container Monitoring solution in Log Analytics](https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-containers) using Azure Portal\n\n- Copy the `\u003cWORKSPACE_ID\u003e` and `\u003cWORKSPACE_KEY\u003e`\n\n- `kubectl create secret generic omsagent-secret --from-literal=WSID=WORKSPACE_ID --from-literal=KEY=WORKSPACE_KEY`\n\n- `kubectl create -f oms-daemonset.yaml`\n\n- `kubectl get daemonset`\n\n- Check the OMS Portal after few minutes to see the dashboard\n\n#### Upgrade cluster\n\n- `az aks get-upgrades -n jackaks -g akstrials --output table`\n\n- `az aks upgrade -n jackaks -g akstrials --kubernetes-version 1.8.2`\n\n- `az aks show -n jackaks -g akstrials --output table`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomit%2Faks-trials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjomit%2Faks-trials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomit%2Faks-trials/lists"}