Skip to content

azooinmyluggage/voting-app-kubernetes

 
 

Repository files navigation

Voting-App-Kubernetes

Inspired by example-voting-app

Architecture

  • vote: Python web app which allows you to vote between two options. The vote is saved onto an Azure Storage queue
  • worker: .NET core worker consumes votes from the Azure Storage queue and stores them in an Azure Storage Table
  • result: node.js web app which reads the Azure Storage Table and displays the results of the voting in real-time

Deployment

Create Azure Secret

Base64 encode Azure Storage Account Name and Key:

$ echo -n "[azure-storage-account-name]" | base64
$ echo -n "[azure-storage-account-key]" | base64

Create Kubernetes Secret

secret-azurestorage.yaml:

apiVersion: v1
kind: Secret
metadata:
  name: azure-storage
type: Opaque
data:
  account-name: [azure-storage-account-name | base64]
  access-key: [azure-storage-account-key | base64]
$ kubectl create -f secret-azurestorage.yaml

Deploy to Kubernetes

kubectl create -f vote.yaml
kubectl create -f worker.yaml
kubectl create -f result.yaml

About

Voting App on Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.9%
  • C# 2.5%
  • CSS 1.9%
  • HTML 1.7%
  • Shell 1.6%
  • Python 0.8%
  • Dockerfile 0.6%