Skip to content

cl-a-us/k8s-demo-app

 
 

Repository files navigation

Simple demo app for k8s

The goal is to have a simple app that can be used to demonstrate some features you can use in k8s.

This demo app uses spring boot and a h2-database as technologies.

Features

  • endpoint for a health check, which can be controlled via environment variable
  • endpoint for a readiness check, which can be controlled via rest endpoint
  • background-color and some text customizable via spring config

Running

Run with docker

docker run -p 8080:8080 public.ecr.aws/viadee/k8s-demo-app:latest

Then browse to http://localhost:8080

Or build and run with maven locally:

mvn spring-boot:run

Building

This is a simple maven project. Just run maven package.

Or just do a local docker build: docker build -t imagename . Then you can run the container locally.

Native Build in github Codespaces

mvn clean
# 'package' contains step 'process-aot' which is needed for native:compile
mvn package -Pnative 
mvn native:compile
# If "[1/8] Initializing..." fails, it might be due to a lag of resources. Try increasing the VM resources.

start native build

./target/k8s-demo-app
./target/k8s-demo-app --spring.profiles.active=red

About

Simple demo app for k8s

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 76.7%
  • HTML 22.1%
  • Dockerfile 1.2%