{"id":21481694,"url":"https://github.com/jorricks/whac-a-mole-kubernetes","last_synced_at":"2026-07-03T02:01:46.242Z","repository":{"id":137773414,"uuid":"225641596","full_name":"Jorricks/Whac-a-mole-kubernetes","owner":"Jorricks","description":"Kubernetes based Whac-a-mole game","archived":false,"fork":false,"pushed_at":"2019-12-10T14:07:14.000Z","size":5085,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T14:50:24.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jorricks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-03T14:36:08.000Z","updated_at":"2023-12-12T20:40:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"d759bfdf-b183-4260-885f-fa9bf4fd49e3","html_url":"https://github.com/Jorricks/Whac-a-mole-kubernetes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jorricks/Whac-a-mole-kubernetes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jorricks%2FWhac-a-mole-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jorricks%2FWhac-a-mole-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jorricks%2FWhac-a-mole-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jorricks%2FWhac-a-mole-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jorricks","download_url":"https://codeload.github.com/Jorricks/Whac-a-mole-kubernetes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jorricks%2FWhac-a-mole-kubernetes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35069183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T12:27:50.256Z","updated_at":"2026-07-03T02:01:46.187Z","avatar_url":"https://github.com/Jorricks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes based Whac-a-mole game\nThis is whac-a-mole game with Kubernetes running in the background. \n\nEach mole is a kubernetes pod. \nThe goal is to kill the pods faster than kubernetes can deploy new ones.\n\n# Example\n![](whac-a-mole-kubernetes.gif)\n\n# Explanation of the application\nThis repository is split into three applications.\n\n### Mole pod\nThis is a very basic flask application which is dockerized.\\\nIt contains three endpoints: /health, /kill and /shutdown. \\\nThis application is than build as a docker image and ran as a pod in Kubernetes. \\\nIn the final web interface, a mole is molepod container.\n\n### Mole relay\nAgain a very basic flask application which is dockerized.\\\nIt contains two endpoints: / and /health. \\\nThe purpose of this application is to be the bridge between the host and the minikube environment. \\\nMeaning that when we want to access a mole pod, we actually make the request through a container \\\nwith the docker image of this mole relay program.\n\n### Mole game\nThis application contains most of the logic.\\\nBased on the configuration given by the command line arguments, it starts the two pods(mole pod\n and mole relay). \\\nOnce the pods are deployed, the front end flask app is launched. \\\nHere we can access our whac a mole interface. \\\nWhen we press a mole, a kill or shutdown command is send through the server, to the relay, \nto finally end up at the specific container in the mole pod. \\\nOnce the mole pod is down, kubernetes will take care to relaunch it.\n\n# Requirements\n1. Python3.7\n2. Docker\n3. Minikube\n4. Google Chrome\n\n# General instructions\n### Terminal commands to get a working Minikube\nNote that the application expects the application to be launched from within a folder of the project\nroot \"whac-a-mole-kubernetes\". If you change the project folders name, you do not only have to \nchange the upcoming commands but also part of the project. \\\nYou can store the 'whac-a-mole-kubernetes' directory anywhere you like, as long as you set the\ncorrect MINIKUBE_HOME location for each terminal session\n    \n    export MINIKUBE_HOME=~/PycharmProjects/whac-a-mole-kubernetes;\n    export PATH=$MINIKUBE_HOME/bin:$PATH\n    export KUBECONFIG=$MINIKUBE_HOME/.kube/config\n    export KUBE_EDITOR=\"code -w\"\n    \n### To create a new minikube profile\nIn our application we use the profile 'whac'. This profile can be created in the following way:\n\n    minikube --profile whac config set memory 6144\n    minikube --profile whac config set cpus 2\n    minikube --profile whac config set vm-driver hyperkit\n    minikube --profile whac config set kubernetes-version v1.15.6\n    minikube start --profile whac\n    minikube profile whac\n\n# How to start the molegame\nAfter you set the terminal commands to get a working minikube setup and started the 'whac' profile, \nwe can build the pod and relay. The assumption is made that we start from the project directory.\n\n    eval $(minikube docker-env)\n    cd relay\n    docker build -t molerelayprod . \n    cd ../pod\n    docker build -t molepodprod . \n\nOnce the docker images are build, we can already start out application. \\\nThis can either be done by pip installing our game, or by simply running \ngame/src/molegame/main.py. \\\nIn the case you kept the default ports, the interface of whac-a-mole is accessible at \nhttp://localhost:80. \\\n\n# How to contribute\n1. Fork the repository. \n2. Make your change.\n3. Verify the changes are correct by running.\n\n        mypy --ignore-missing-imports pod/src/molepod/ game/src/molegame/ relay/src/molerelay/\n        flake8 --max-line-length=100 pod/src/molepod game/src/molegame relay/src/molerelay\n        \n4. Provide a pull request.\n\n# Special thanks to\n- [Burr Sutter for his excelent explanation of Kubernetes.](https://www.youtube.com/watch?v=ZpbXSdzp_vo)\n- [The designer of this image of which I borrowed my design.](https://www.skincancer.org/wp-content/uploads/whackamole-900px.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorricks%2Fwhac-a-mole-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorricks%2Fwhac-a-mole-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorricks%2Fwhac-a-mole-kubernetes/lists"}