Add microservices orchestration project (#8) - #136
Merged
Conversation
New hands-on project: three FastAPI microservices (order, inventory, notification) deployed to a local kind cluster, demonstrating Kubernetes orchestration fundamentals — service discovery via K8s DNS (no hardcoded IPs), config injection via ConfigMap, readiness/liveness probes, and horizontal scaling (manual kubectl scale + a working HPA on real metrics-server CPU data). order-service is the only externally-exposed service (NodePort); it calls inventory-service to reserve stock and notification-service to confirm, both resolved purely through K8s Service DNS names injected via a ConfigMap — the actual "orchestration" this project demonstrates. Verified end-to-end for real, not just written: - demo_project.sh builds all three images, creates a kind cluster, loads the images (no registry needed), applies the manifests, places a real order through the NodePort, and asserts it came back "confirmed" — ran successfully multiple times locally. - Manual scaling verified: scaled order-service to 4 replicas, confirmed requests load-balance across distinct pod names. - HPA verified against real metrics: installed metrics-server (with the --kubelet-insecure-tls patch kind's self-signed kubelet cert needs), confirmed `kubectl top pods` and `kubectl describe hpa` report live CPU numbers, not "unknown". Wires into CI the same way every other project in this repo does: a path-scoped verify-microservices-orchestration.yml workflow that runs demo_project.sh on every push/PR touching this project's folder. Marks project 19 (Microservices Orchestration, issue #8) done in the main README table. Closes #8 Claude-Session: https://claude.ai/code/session_01DgVRQrXf1xhAHKYsV2xVAQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New hands-on project: three FastAPI microservices (
order-service,inventory-service,notification-service) deployed to a localkindcluster, demonstrating actual Kubernetes orchestration mechanics — not just three containers side by side:order-servicenever hardcodes an IP; it resolvesinventory-service/notification-servicepurely through K8s DNS short names.envFrom, not baked into the image.kubectl scale) and a real HPA reacting to live CPU metrics.order-serviceis the only externally-exposed service (NodePort); the response from a placed order shows three different pod names, proof the request actually crossed process/network boundaries via K8s Services.Verification
Verified for real, multiple times, not just written:
demo_project.sh(also wired into CI, see below) builds all three images, creates akindcluster, loads the images (no registry needed for a local demo), applies the manifests, places a real order through the NodePort, and asserts the response is"status":"confirmed".order-serviceto 4 replicas, fired several orders, confirmed the"pod"field in each response rotates across distinct pod names — real load-balancing, not a mock.metrics-server(with the--kubelet-insecure-tlspatchkind's self-signed kubelet cert needs — undocumented gotcha, now documented in the project README), confirmedkubectl top podsandkubectl describe hpa order-servicereport real CPU numbers within seconds, not"unknown".What's included
projects/microservices-orchestration/— 3 services (Dockerfile + FastAPI app each), K8s manifests (namespace, ConfigMap, 3 Deployment+Service pairs, an HPA),kind-config.yaml,demo_project.sh, and a project README following this repo's existing documentation convention (Overview/Prerequisite/numbered walkthrough)..github/workflows/verify-microservices-orchestration.yml— path-scoped, runsdemo_project.shon every push/PR touching this project, same pattern as every other project'sverify-*.yml.README.md— project 19 (issue project: Microservices Orchestration #8) marked✔️ Done, linked to the new folder instead of the issue.Closes #8
https://claude.ai/code/session_01DgVRQrXf1xhAHKYsV2xVAQ