Codebase for the blog post #HOWTO: Deploy Java EE applications to Kubernetes
Steps to run this project:
- Clone this Git repository
- Navigate to the folder
java-ee-kubernetes-deployment
- Make sure you have Docker with Kubernetes support running on your machine
- Create a local Docker registry:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
- Build the application with
mvn clean package
- Build the Docker image with
docker build -t java-ee-kubernetes .
- Tag and push the Docker image to your local registry
docker tag java-ee-kubernetes localhost:5000/java-ee-kubernetes
- Deploy the application with
kubectl apply -f deployment.yml
- Wait until the two pods are available and then visit http://localhost:31000/resources/sample