Deploy "Voting App" using Azure Kubernetes Cluster Service
#AKS #Kubernetes #Container #App #YAML

Search for a command to run...
#AKS #Kubernetes #Container #App #YAML

Thanks for the in detailed AKS Demo setup article.
I have followed this blog as it as and it worked successfully.
I got stuck at copy paste in cloud shell and I have used the below commands.
Copy and paste Windows: Ctrl-c to copy is supported
but use Shift-insert to paste.
FireFox/IE may not support clipboard permissions properly.
Glad you find it detailed. Happy Learning. Keep it up.
AWS Agent Plugins let AI coding agents deploy, architect, and operate on AWS. Here's what that means for the future of DevOps.

AWS Storage Gateway bridges your on-premises infrastructure with Amazon's cloud storage — letting you use familiar protocols like NFS, SMB, and iSCSI while your data lives safely in S3, EBS, or Glacie

This AZ-104 domain emphasizes secure identity management and efficient resource governance, which are essential for Azure administrators to ensure compliance and cost control. Overview of Azure Identi

Scaling your EC2 instances to match dynamic workloads can be challenging. Amazon EC2 Auto Scaling simplifies this with target tracking scaling policies, a powerful feature that automatically adjusts capacity to maintain optimal performance and cost e...

IntroductionAmazon Elastic Block Store (EBS) is a cornerstone of AWS storage solutions, offering persistent block-level storage for EC2 instances. While EBS volumes are typically attached to a single instance.# EBS Multi-Attach breaks this mold, allo...

CloudCubes by Jinesh
45 posts
Cloud Infrastructure Consultant
Find me here : jineshkumar.bio.link
https://jineshkumar.com
On this page
Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage clusters.
This is a Tutorial on how to deploy a container-based application (Voting-App) using Azure Kubernetes Cluster service.
Kubernetes is a production-ready, portable, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.
Basically, Kubernetes is a container orchestration tool When you deploy Kubernetes, you get a cluster. This Cluster has MASTER NODE and WORKER NODEs.
The abbreviation K8s is derived by replacing the eight letters of “ubernete” with the digit 8.
To understand Kubernetes Architecture overview, I post some Images and their Source which are good place to start learning about Kubernetes if you are new to k8s.
Note : This is just overview understand this Application Deployment for this Blog. I have plans to provide more in-depth Kubernetes tutorials coming soon. Consider Following my Blogs.Thx.
Image Source : https://kubernetes.io/docs/tutorials/kubernetes-basics/
Image Source : https://www.edureka.co/blog/kubernetes-tutorial/

Image source : https://collabnix.com/5-minutes-to-kubernetes-architecture/
To-do List :
On Azure Portal > Search Kubernetes Service > Create k8s Cluster and It will ask for Product details like Resource Group Name, Cluster Name, Region, Availability Zones, Kubernetes Version, Node Size, Scale Method(AutoScaling), Node Count Range (1-2).
Configure those as you want then Review + Create As per,
Note: Primary node pool
The number and size of nodes in the primary node pool in your cluster. For production workloads, at least 3 nodes are recommended for resiliency. For development or test workloads, only one node is required.
Validation passed > Hit Create.
And We have successfully deployed Azure Kubernetes Cluster with 2 nodes on which we can deploy our Container-based Voting Application.
Go to Resource once deployment successful notification popup.
Our K8s Cluster (VotingAppCluster) Overview page,
Open Azure CLI from the Azure Portal button from top-right corner. Bash Azure Cloud Shell will pop from the bottom,
Note : When you first-time open the Cloud Shell, you will find that it requires you to create a Storage account. The reason for that Storage Account is to persist the scripts, keys, etc that you'll use over and over as you interact with your resources
Get access credentials for a managed Kubernetes cluster.
az aks get-credentials --resource-group YourResourceGroupNAME --name YourAKSClusterNAME
Verify the connection to your cluster using the "kubectl get nodes" This command returns a list of the cluster nodes. (We have 2)

A Redis instance.
First Create a file named votingapp.yaml
I used nano editor to create, Edit, and save .yaml file.

-paste below content into the nano editor for votingapp.yaml file
run > nano votingapp.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: azure-vote-back
spec:
replicas: 1
selector:
matchLabels:
app: azure-vote-back
template:
metadata:
labels:
app: azure-vote-back
spec:
nodeSelector:
"kubernetes.io/os": linux
containers:
- name: azure-vote-back
image: mcr.microsoft.com/oss/bitnami/redis:6.0.8
env:
- name: ALLOW_EMPTY_PASSWORD
value: "yes"
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 256Mi
ports:
- containerPort: 6379
name: redis
---
apiVersion: v1
kind: Service
metadata:
name: azure-vote-back
spec:
ports:
- port: 6379
selector:
app: azure-vote-back
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: azure-vote-front
spec:
replicas: 1
selector:
matchLabels:
app: azure-vote-front
template:
metadata:
labels:
app: azure-vote-front
spec:
nodeSelector:
"kubernetes.io/os": linux
containers:
- name: azure-vote-front
image: mcr.microsoft.com/azuredocs/azure-vote-front:v1
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 256Mi
ports:
- containerPort: 80
env:
- name: REDIS
value: "azure-vote-back"
---
apiVersion: v1
kind: Service
metadata:
name: azure-vote-front
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: azure-vote-front
kubectl apply -f votingapp.yaml

kubectl get service azure-vote-front --watch
This shows our Application's external Public IP address.
My App's External-IP = 52.190.47.180
You got that. This App is deployed on 2 Cluster Nodes with high availibility and resiliency.

Success.
I am on my continuous learning quest and Kubernetes is in the top list. I apologize if I may have missed some key details or explained less on some commands performed above.
I will be coming up with more in-depth tutorials and blogs about Kubernetes and DevOps in future content.
Hope you have followed along and like the Blog about
Deploy "Voting App" using Azure Kubernetes Cluster Service
Let me know if you have any questions or suggestions to improve my knowledge.
Thanks for your time.
Follow for more Awesome Azure and AWS Content.
Regards,
Jineshkumar Patel