This repository contains sample code for the talk "It (only) starts with containers" which demonstrates various approaches to deploying a Java application in Kubernetes.
<iframe width="560" height="315" src="https://www.youtube.com/embed/q0_KPLHOnCg?si=x_MxcmKbrcsE5eiz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>WARNING: These yaml files are of "works on my cluster" kind. You will need to modify your domain and ingress settings to something that works in your environment.
The sample application is a Jakarta EE REST service built with:
- Java 21 and Jakarta EE 10
- Payara Micro as the runtime
- MicroProfile Config for configuration
- Simple REST endpoints for demonstration
GET /hello- Returns a greeting message- Configurable default name via
hello.defaultNameproperty - Optional downstream service calls to demonstrate service-to-service communication
- Hostname detection for tracing requests across instances
This repository demonstrates 6 different approaches to deploy the same Java application to Kubernetes:
Direct Kubernetes manifests with all resources defined explicitly.
instance-1.yaml- Complete deployment with Namespace, ConfigMap, Deployment, Service, and Ingressinstance-2.yaml- Second instance with different configuration
Template-free customization of Kubernetes objects using overlays.
base/- Base manifestsfirst-instance/,second-instance/,third-instance/- Environment-specific overlaysboth-instances/- Deploy multiple instances together -- doesn't work. Need to be sorted with ArgoCD
Package manager for Kubernetes with templating capabilities.
container-app/- Helm chart with templates*-values.yaml- Environment-specific value filescombined/- Multi-instance deployment using same base chart
Infrastructure as Code using familiar programming languages.
container-app/- Pulumi project for deployment automation in Java
GitOps continuous delivery tool for Kubernetes.
- Application definitions for managing deployments
project.yml- ArgoCD project configuration- References to the other deployment approaches
Utility deployment to keep demo domains active.
cd container-app
mvn clean packagemvn clean package payara-micro:devmvn package docker:push # change the image name you hopefully cannot push under my creds in Docker Hub
# Image: pdudits/container-talk-demo:latestChoose your preferred deployment method:
Plain YAML:
kubectl apply -f 01-yaml/instance-1.yamlKustomize:
kubectl apply -k 02-kustomize/first-instance/Helm:
helm install first-instance 03-helm/container-app/ -f 03-helm/first-instance-values.yamlPulumi:
cd 04-pulumi/container-app
pulumi upEach deployment approach demonstrates different configuration methods:
- Environment-specific default names
- Resource limits and requests
- Ingress configurations for external access
- Service-to-service communication setup
This repository illustrates the evolution from simple container deployment to sophisticated GitOps workflows, showing:
- The progression of tooling complexity
- Trade-offs between simplicity and maintainability
- How each approach addresses different operational needs
- Best practices for production deployments
The talk emphasizes that while containers are the starting point, production-ready deployments require thoughtful consideration of deployment strategies, configuration management, and operational workflows.