A simple Python 3 Flask based web UI for the Dad Jokes microservice project. The project is built around the idea of deployment hosted on Docker, and Kubernetes.
See the deployment examples within the examples folder.
The Kubernetes example deployes two services, and two deployments.
- Creation of a service, and deployment of the DadJokes Microservice to generate the jokes.
- Service creation with a type of NodePort.
- Creation of a service, and deployment of the DadJokes UI, providing a web view of the output of the DadJokes Microservice.
- Service creation with a type of NodePort.
See the Kubernetes examples provided.
See the docker-compose example provided.
The Kubernetes/loadbalancer example has the UWSGI stats server enabled. The deployment will include a sidecar container for the UWSGI Exporter to allow exporting metrics to Prometheus on the performance of UWSGI.
The service created for the load balancer includes exposing the UWSGI stats over port 9117 via http. This configuration can be used to allow Prometheus to scrape metrics. A simple example of a Prometheus scrape job setup would be as follows:
- job_name: 'uwsgi'
static_configs:
- targets:
- '192.168.1.53:9117'
This is a very simple configuration, with a static job, that scrapes the metrics from the loadbalancer located at IP 192.168.1.53 via port 9117.