Skip to content

mnapoleon/env-viewer

Repository files navigation

Env Viewer

This is a simple Spring Boot application that displays the environment variables it is running with. It serves as a basic example of a containerized Java application with Kubernetes and Helm configurations.

Features

  • Exposes a single REST endpoint / that returns a JSON object containing all environment variables.
  • Built with Java 21 and Spring Boot 3.2.0.
  • Containerized using Jib.
  • Includes Kubernetes deployment, service, and configmap configurations.
  • Includes a Helm chart for easy deployment to Kubernetes.

Prerequisites

  • Java 21
  • Gradle 8.x

Building the Project

To build the project, run the following command:

./gradlew build

Running the Project Locally

To run the application locally, use the following command:

./gradlew bootRun

The application will be available at http://localhost:8080.

Containerization

To build the container image using Jib, run the following command:

./gradlew jib

This will build the image and push it to the configured registry in build.gradle.

Deployment

Kubernetes

The project can be deployed to Kubernetes using the provided YAML files:

kubectl apply -f configmap.yaml
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml

Helm

The project can also be deployed using the provided Helm chart:

helm install env-viewer ./env-viewer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published