How to deploy geoip-attack-map on Kubernetes

Source Code

The new forked code are kept in this repository geoip-attack-map. There are 2 services in the same repository. The 1st one is attack-map-server which works like a web application and the 2nd is attack-map-feeder which works like a data feeder who feeds the cyber attacks data to the web server via message queue (we’re using Redis for the message queue implementation). These are the enhancements I added into the forked repository.

  • Created 2 docker files in order to containerize the application.
  • Make the application to be more configurable via environment setting.
  • Created a Helm chart to simplify the application deployment process to Kubernetes cluster.
  • Created a CI/CD pipeline (GitHub Actions) to build chart and 2 docker files as well.

Containerizing the application

Because we want to deploy the application into Kubernetes cluster so, we need to create 2 docker images, one for attack-map-server and another for attack-map-feeder which later each container will run in its own pod.

Making the application to be more configurable

The code from original repository seems to do a lot of hard coding so I modified the forked code as the following.

  • Change the way to identify the endpoint where WebSocket should connect to but assuming to use wss scheme.
  • Pass the latitude and longitude of the head headquarter via the environment variables.
  • Pass the Mapbox API token via environment variable.
  • Pass the Redis IP address via environment variable.

Creating Helm chart for the application deployment

As mentioned earlier, we need to simplify the deploy process so I decided to create a Helm chart and keep it in the same repository here.

Using test data generator script

There is a test data generator script provided in the original repository. I modified it a little bit here in the forked repository. Once the application is deployed, we can use kubectl exec into the attack-map-feeder pod and run the script as shown below.

bash &


Congratulation!!! if you’ve read the entire article and it is able to help you solve your issues. You can support me by:

  • Follow me.
  • Share my articles.
  • Buy me a coffee via ADA address below if you want.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store