This demo project highlights the advantages of using Distroless containers by evaluating key metrics such as image size, deployment time, and data transfer efficiency.
- Image Size Reduction: Compare the size of a standard container image with a Distroless version.
- Deployment Time Improvement: Measure the deployment time reduction achieved by using Distroless containers.
- Data Transfer Efficiency: Analyze the impact on network usage and costs when deploying to cloud environments.
- Initial Setup: Provision a Kubernetes cluster connected to a private Docker registry and create a standard container image, including build tools and a generic JRE.
- Implementation of Best Practices: Utilize Multi-stage builds and Distroless best practices, along with tools like jdeps and jlink fro JRE optimization.
- Measurement: Record metrics for image size, deployment time, and network usage during deployment to Kubernetes worker nodes.
- Successfully reduced image size from 842MB to just 39.5MB.
- Lowered deployment time significantly, from 44.78 seconds to 10.38 seconds.
- Achieved +23x reduction in data transfer from the private local registry to the seven Kubernetes worker nodes.
Using Distroless images can lead to monthly cost savings and minimize traffic congestion.