HUB
Sign inSign up
random-generator logo

k8spatterns/random-generator

By k8spatterns

•Updated about 3 years ago

Sample REST service returning a random number

Image
0

10K+

k8spatterns/random-generator repository overview

⁠Random Number Generator Service

This is a very simple Spring Boot service which just generates a random number and returns it as JSON:

curl -sL http://localhost:8080/ | jq .
{
  "random": 838265052,
  "id": "58da4c5b-ba06-438e-84f8-1a30581baeb8"
}

Start the service with either ./mvnw spring-boot:run or, after building with ./mvnw package, with java -jar target/random-generator-*.jar

Refer to the Image Builder⁠ pattern in the Kubernetes Patterns books example repository⁠ how this example is build from within a Kubernetes cluster.

Tag summary
Recent tags
Content type
Image
Digest
sha256:af67cd54a…
Size
105.9 MB
Last updated
over 3 years ago
docker pull k8spatterns/random-generator:latest