Skip to content

A fun project to learn some awesome new technologies

Notifications You must be signed in to change notification settings

lukasweber/k8s-go-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Prime Counter

screenshot

This is a fun project that I made to learn some stuff that I always wanted to get to know better. The application does not have a specific purpose other than that. I especially wanted to see how the scaling and load balancing behaves with K8s, which is why the ui displays the pods where the request went through.

Specifically, I used the following technologies:

Architectual Overview

This is a very simplified overview of the architecture.

screenshot

Getting Started

Using minikube:

# Setup minikube docker environment
minikube start
eval $(minikube docker-env)

# Build all services
earthly +all-docker

# Allows the access to NodePort and Ingress (Execute this in a seperate terminal)
minikube tunnel

# Deploy the application
kubectl apply -f deploy/

Now you should be able to access http://localhost:80 (for UI and API), http://localhost:9090/ (for Prometheus) and http://localhost:4000 (for Grafana).

Additional Notes

⚠️ Currently the Prometheus Deployment is running with a Service Account that has the cluster role cluster-admin assigned, which is not recommended for production!