Companion code for "Deploying Spring Boot 4 on Kubernetes: Probes, Graceful Shutdown, Limits and JVM Ergonomics". A dependency outage under three probe-group setups, a rolling restart under load four ways (three runs each), the JVM's ergonomic choices for nine pod shapes, one GC-heavy load under five CPU limits with throttling counters, and an HPA driven by a Micrometer gauge through prometheus-adapter. Measured on k3s v1.36.4. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C3TETMrqVUWeFkNtz3Jbo3
57 lines
3.4 KiB
Plaintext
57 lines
3.4 KiB
Plaintext
# DEMO_STARTUP_DELAY=40s: the context takes ~45 s to refresh, and Tomcat only listens after that.
|
|
# 1 replica, rolling update (maxSurge 1, maxUnavailable 0). Liveness: period 5 s, failureThreshold 3.
|
|
# Pods being deleted are not listed. The old pod keeps serving while the new one is not ready.
|
|
|
|
## no startupProbe
|
|
t= 0s [7ltj7 ready=true restarts=0]
|
|
t= 7s [gqllk ready=false restarts=0] [7ltj7 ready=true restarts=0]
|
|
t= 13s [gqllk ready=false restarts=0] [7ltj7 ready=true restarts=0]
|
|
t= 19s [gqllk ready=false restarts=0] [7ltj7 ready=true restarts=0]
|
|
t= 25s [gqllk ready=false restarts=0] [7ltj7 ready=true restarts=0]
|
|
t= 32s [gqllk ready=false restarts=0] [7ltj7 ready=true restarts=0]
|
|
t= 38s [gqllk ready=false restarts=0] [7ltj7 ready=true restarts=0]
|
|
t= 44s [gqllk ready=false restarts=0] [7ltj7 ready=true restarts=0]
|
|
t= 50s [gqllk ready=false restarts=1] [7ltj7 ready=true restarts=0]
|
|
t= 57s [gqllk ready=false restarts=1] [7ltj7 ready=true restarts=0]
|
|
t= 63s [gqllk ready=false restarts=1] [7ltj7 ready=true restarts=0]
|
|
t= 69s [gqllk ready=false restarts=1] [7ltj7 ready=true restarts=0]
|
|
t= 75s [gqllk ready=false restarts=1] [7ltj7 ready=true restarts=0]
|
|
t= 81s [gqllk ready=false restarts=1] [7ltj7 ready=true restarts=0]
|
|
t= 88s [gqllk ready=false restarts=2] [7ltj7 ready=true restarts=0]
|
|
t= 94s [gqllk ready=false restarts=2] [7ltj7 ready=true restarts=0]
|
|
t=100s [gqllk ready=false restarts=2] [7ltj7 ready=true restarts=0]
|
|
t=106s [gqllk ready=false restarts=2] [7ltj7 ready=true restarts=0]
|
|
t=112s [gqllk ready=false restarts=2] [7ltj7 ready=true restarts=0]
|
|
t=118s [gqllk ready=false restarts=2] [7ltj7 ready=true restarts=0]
|
|
|
|
# Events so far:
|
|
1 Normal Killing Container app failed liveness probe, will be restarted
|
|
1 Warning Unhealthy Liveness probe failed: Get "http://10.42.0.221:8080/actuator/health/liveness": dial tcp 10.42.0.221:8080: connect: connection refused
|
|
1 Warning Unhealthy Readiness probe failed: Get "http://10.42.0.221:8080/actuator/health/readiness": dial tcp 10.42.0.221:8080: connect: connection refused
|
|
|
|
## startupProbe: /actuator/health/liveness every 2 s, failureThreshold 60 (a 120 s budget)
|
|
t= 0s [7ltj7 ready=true restarts=0]
|
|
t= 7s [7ltj7 ready=true restarts=0] [jthjg ready=false restarts=0]
|
|
t= 13s [7ltj7 ready=true restarts=0] [jthjg ready=false restarts=0]
|
|
t= 20s [7ltj7 ready=true restarts=0] [jthjg ready=false restarts=0]
|
|
t= 26s [7ltj7 ready=true restarts=0] [jthjg ready=false restarts=0]
|
|
t= 32s [7ltj7 ready=true restarts=0] [jthjg ready=false restarts=0]
|
|
t= 39s [7ltj7 ready=true restarts=0] [jthjg ready=false restarts=0]
|
|
t= 45s [7ltj7 ready=true restarts=0] [jthjg ready=false restarts=0]
|
|
t= 51s [jthjg ready=true restarts=0]
|
|
t= 58s [jthjg ready=true restarts=0]
|
|
t= 64s [jthjg ready=true restarts=0]
|
|
t= 70s [jthjg ready=true restarts=0]
|
|
t= 76s [jthjg ready=true restarts=0]
|
|
t= 82s [jthjg ready=true restarts=0]
|
|
t= 88s [jthjg ready=true restarts=0]
|
|
t= 95s [jthjg ready=true restarts=0]
|
|
t=101s [jthjg ready=true restarts=0]
|
|
t=108s [jthjg ready=true restarts=0]
|
|
t=114s [jthjg ready=true restarts=0]
|
|
t=120s [jthjg ready=true restarts=0]
|
|
|
|
# Events during the startupProbe run:
|
|
2 Normal Killing Stopping container app
|
|
1 Warning Unhealthy Startup probe failed: Get "http://10.42.0.222:8080/actuator/health/liveness": dial tcp 10.42.0.222:8080: connect: connection refused
|