This repository contains the resource Manifests for a simple Voting App that is built using Kustomize and Kubernetes. This Voting App is a simple web application that allows users to Vote for their favorite pets.
The Voting App consists of the following components:
- A
Frontend Service
that serves the web application to users to vote for their favorite pets (cats or dogs). It is Developed using Python Flask. - A
Redis Service
that stores the votes. - A
Worker Service
that processes the votes and stores them in the Postgres databas. It is Written in .NET. - A
Postgres Service
that stores the details of the votes such as the pet name and the number of votes. - A
Result Service
that displays the results of the votes. It is Written in Node.js.
Before you begin, ensure you have the following installed on your local machine:
- A Linux Machine with
Docker
andKubernetes
installed. - With
Kustomize CLI installed
on your linux machine.
To deploy the Voting App on your Kubernetes cluster, perform the following steps:
- Clone this repository to your local machine:
git clone https://github.com/mathesh-me/kustomize-voting-app
- Change into the directory of the cloned repository:
cd kustomize-voting-app
- Create a namespace for the Voting App using the following command:
kubectl create namespace voteapp
- Deploy the Voting App on your Kubernetes cluster using the following command:
kubectl apply -k voting-app/
- To access the Voting App, Use the below URL:
- Vote for your favorite pet: http://node-ip:30111
- View the results of the votes: http://node-ip:30112
You can also see my article on Medium for a detailed explanation of the Voting App and how to deploy it using Kustomize and Kubernetes.
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please feel free to submit a Pull Request. If you have better ideas you can create a PR and I will merge it.