This is a very simple web app to showcase a deploy on k8s.
This app is composed by:
- a client rendered web UI (Angular)
- a web service exposing a REST api endpoint (Spring Boot)
The deployment files are hosted in a separate repo mattmezza/k8s-seminar-config.
In order to run the web app locally, you will need to install the following on your machine:
- nodejs (for the UI)
- openjdk (for the api)
For further info on how to install the web app locally, please refer to the individual app (ui and api).
First, make sure you cloned this repository on your machine.
cd ui
docker build -t k8s-seminar-ui:1.0.0 .
cd api
mvn package
docker build -t k8s-seminar-api:1.0.0 .
Once you have built the images, running the containers is pretty easy.
docker run -p8081:80 k8s-seminar-ui:1.0.0
docker run -p8080:8080 k8s-seminar-api:1.0.0
A this point you should have the UI running on port 8081
and the API running on port 8080
on your local machine.
This means you can open your browser and visit http://localhost:8081.
Instructions on how to deploy this web app on a k8s cluster can be found in mattmezza/k8s-seminar-config.