Deployed Voting App using Kubernetes


The project is consist of the below mentioned components:-
A front-end web app in Python which lets you vote between two options
A Redis which collects new votes
A .NET worker which consumes votes and stores them in…
A Postgres database backed by a Docker volume
A Node.js web app which shows the results of the voting in real time
Deploying on Kubernetes
The app is deployed using Kubernetes manifests defining Pods, Deployments, and Services to expose and connect components. Here are the high-level steps:
Create a Kubernetes cluster: You can use any Kubernetes environment such as Minikube.
Apply Deployment manifests: Using
kubectl apply -f
, deploy each component as a separate pod:vote
(Python front-end)redis
worker
(.NET)postgres
result
(Node.js)
Expose services:
Enable the ingress in minikube cluster using the
minikube addons enable ingress
Create the ingress.ymal and apply it.
Expose the
svc/ingress-controller
Verify the deployment: Use
kubectl get pods,svc
to ensure all pods are running and services are configured correctly.Access the apps:
Visit the voting app via assigned through ingress paths.
Vote and watch the results app update dynamically as votes are processed.
This is how you can leverage Kubernetes’ features for service discovery, scaling, and persistent storage, developers can build resilient, scalable, and maintainable cloud-native apps. Thank you for reading any tips will be appreciated.
Subscribe to my newsletter
Read articles from Subrat Yadav directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
