This demo consists of a minimal client-server Kubernetes application. The front-end is in React (Javascript), and the back-end is in Cherrypy (Python). It can be packaged in a Helm chart. Also, it can be continuously deployed at development time using Skaffold.
You need to have Docker, Kubectl, Minikube, NGINX Ingress Controller, Helm, and Skaffold installed.
- To build the demo (build docker images and package the helm chart) :
.\gradlew buildApp
- To build and deploy into a Kubernetes cluster:
.\gradlew deployApp
- To continuously deploy for development:
skaffold dev
|-- client/ | |-- src/: front-end source code. | |-- Dockerfile: front-end Docker image recipe. | |-- build.gradle: build Docker image task. | |-- package.json: project metadata. |-- server/ | |-- src/: back-end source code. | |-- Dockerfile: back-end Docker image recipe. | |-- build.gradle: build Docker image task. | |-- requirements.txt: list of dependencies. |-- helm/ | |-- chart/ | | |-- templates/: parameterizable Kubernetes objects. | | |-- Chart.yaml: name and version information. | | |-- values.yaml: values to feed the templates. | |-- build.gradle: helm chart package task. |-- build.gradle: build and deploy tasks. |-- settings.gradle |-- skaffold.yaml: for continuous deployment at development time.
- Client and Server are running in different Docker containers, inside a single pod.
- A service is exposing the pod inside the Kubernetes cluster.
- The ingress allows access to the service from outside the Kubernetes cluster.
To access the application:
- Front-end:
http://<hostname>/client
- Backend:
http://<hostname>/server
- Leonardo Coelho - leonardo.coelho@ua.pt