Its a simple counter app which logs and increments the count from a file. Repository includes Dockerfile and respective kubernetes manifest.
This repo is used in Medium Blog: K8s Deployment vs Statefulset vs Daemonset.
The image is already pushed at docker.io/kahootali/counter
. You can use that or build and run the app yourself using the following commands.
You can build the image by docker build -t counter .
You can build the image by docker run -it counter
You can deploy on kubernetes using the manifests present in kubernetes
folder. I have used Persistent Volumes so that when scaling replicas of Deployments or Statefulsets, you can easily see the difference.