Deploying event-driven services on minikube
The event notification service and the order service, unchanged, replaced by a stop and restart, a rolling update, a schema change and a blue-green cut-over under a producer that numbers every record.
examples/af-deploying-event-driven-services/ changes two running services in five ways while a producer Job sends uniquely numbered records at a fixed rate. It accompanies Appendix F.
It is a kustomize overlay over the shared minikube setup in examples/_k8s and a verify.sh, with no Java. The services are the notification-service and the order-service, built from their own Containerfiles and loaded into the node unchanged.
examples/_k8s/cluster.sh up
cd examples/af-deploying-event-driven-services
./verify.sh
What to observe
- A stop and restart. No row is written while the pods are replaced, the lag drains afterwards and every record has a row.
- A rolling update. Each pod is replaced in turn, every record has a row, and a bounded number are delivered again.
- Requests during a rollout. Connection-level failures stay below a ceiling, no request gets a 5xx, and every 201 left exactly one event.
- A breaking change. Records with a renamed field produce no row, the group’s lag is zero and the log holds the only trace; a record with both fields is stored.
- Blue-green. Green holds blue’s committed offsets before it starts, nothing is missing across the cut-over and the rollback, and the groups share only the records after the last commit.
Infrastructure
Strimzi, Kafka and CloudNativePG from examples/_k8s on the edp minikube profile, the two services, and a producer Job per scenario. The order-service is reached on NodePort 30080.