-
create userAKSCluster
az aks create \
–resource-group teamResources \
–name userAKSCluster \
–location eastus \
–enable-addons monitoring,kube-dashboard \
–node-count 1 \
–attach-acr registryjrm1796 \
–generate-ssh-keys \
–enable-managed-identity \
–enable-cluster-autoscaler \
–min-count 1 \
–max-count 2 -
another way to create and attach to acr
az login
az group create –name HansResourceGroup –location eastus
az aks create –resource-group HansResourceGroup –name myAKSCluster –node-count 1 –enable-addons monitoring –generate-ssh-keys
az aks get-credentials –resource-group HansResourceGroup –name myAKSCluster
az aks update -n myAKSCluster -g HansResourceGroup –attach-acr registryjrm1796
az acr repository list –name registryjrm1796 –output table
az acr repository show-tags –name registryjrm1796 –repository user-java –output table
az acr list –resource-group teamResources –query "[].{acrLoginServer:loginServer}" –output table -
Connect to the cluster
az aks get-credentials –resource-group teamResources –name userAKSCluster
kubectl get nodes -
Deploy azure-vote sample app to AKSCluster
root@labvm:~/azure-voting-app-redis/azure-vote# kubectl apply -f https://raw.githubusercontent.com/zhuby1973/azure/main/azure-vote.yaml
deployment.apps/azure-vote-back created
service/azure-vote-back created
deployment.apps/azure-vote-front created
service/azure-vote-front created -
Test the application
root@labvm:~/azure-voting-app-redis/azure-vote# kubectl get service azure-vote-front –watch
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
azure-vote-front LoadBalancer 10.0.183.193 20.75.153.18 80:32384/TCP 25s
you can verify it on http://20.75.153.18/
you can read the sample code on https://github.com/Azure-Samples/azure-voting-app-redis
NOTE commands to push docker images to acr, use user-java image as example:
az login
az acr login –name registryjrm1796
docker tag user-java registryjrm1796.azurecr.io/user-java:latest
docker push registryjrm1796.azurecr.io/user-java
then you should be able to find user-java in Container registries/registryjrm1796/Repositories on https://portal.azure.com/
Thanks for sharing your thoughts about CBD oil for anxiety. Lane Moshe Lepp
Really appreciate you sharing this blog post. Really thank you! Keep writing. Fredrika Corny Francisca
This design is spectacular! You definitely know how to keep a reader amused. Barbi Josh Owen
Thanks for your kind comments!
Way cool! Some very valid points! I appreciate you penning this article plus the rest of the site is really good. Barbara Niki Lezley
Good post. I learn something totally new and challenging on blogs I stumbleupon every day. It will always be interesting to read content from other writers and use a little something from their sites. Karola Vernor Ingmar
Nice blog! Is your theme custom made or did you download it from somewhere? Mireille Ugo Sevik
Way cool! Some very valid points! I appreciate you penning this article and also the rest of the site is also really good.
After looking at a number of the blog posts on your blog, I truly like your technique of writing a blog. I saved it to my bookmark site list and will be checking back in the near future. Please check out my web site too and let me know how you feel.