Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 2.48 KB

README.md

File metadata and controls

53 lines (45 loc) · 2.48 KB

k8s-helm-skaffold-demo

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.

Pre-requisites

You need to have Docker, Kubectl, Minikube, NGINX Ingress Controller, Helm, and Skaffold installed.

Installation

  • 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

Project Structure

|-- 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.

Kubernetes Architecture

  • 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.

K8s Demo Architecture

Demo

To access the application:

  • Front-end: http://<hostname>/client
  • Backend: http://<hostname>/server

K8s Demo Web App

Authors: