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.
- 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.
- Java 21
- Gradle 8.x
To build the project, run the following command:
./gradlew build
To run the application locally, use the following command:
./gradlew bootRun
The application will be available at http://localhost:8080
.
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
.
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
The project can also be deployed using the provided Helm chart:
helm install env-viewer ./env-viewer