Cloud Deployment
Once TechLearningPRO Orders is containerized, cloud deployment is a platform choice: managed Kubernetes (EKS/GKE/AKS), serverless containers (ECS Fargate, Cloud Run), or develop…
Introduction
Once TechLearningPRO Orders is containerized, cloud deployment is a platform choice: managed Kubernetes (EKS/GKE/AKS), serverless containers (ECS Fargate, Cloud Run), or developer-friendly PaaS (Render, Railway, Fly.io).
Match complexity to team capacity. A three-person startup drowning in node pools ships slower than one using a PaaS. An enterprise with multi-region compliance needs GitOps on Kubernetes.
Boot 3 / Java 21 apps stay portable when you keep 12-factor config: env vars, health endpoints, and immutable images. The cloud should change ops — not your domain model.
This lesson frames the decision tree before Docker fundamentals and deep platform labs.
Purpose of this lesson
Choose a cloud deployment path for Orders by team maturity while keeping Boot 3 12-factor portability.
Understanding the topic
Platform complexity must fit the people who operate it.
- PaaS: Render / Railway / Fly — git push to URL; fastest path.
- Serverless containers: Fargate / Cloud Run — containers without node babysitting.
- Managed K8s: EKS/GKE/AKS + GitOps — full control, full cost.
- Data plane: managed Postgres + Redis on day one.
- Portability: OCI image + env config travels between platforms.
Step-by-step explanation
- List constraints: compliance, regions, team size, budget, RTO/RPO.
- Pick PaaS, Fargate/Cloud Run, or managed K8s accordingly.
- Provision managed Postgres/Redis; point Orders at them via env.
- Wire CI to build an image and deploy with a manual prod gate.
Informative example
Decision sketch and portable Boot 3 config.
# Decision (Ops runbook)# Solo / small team -> Render / Railway / Fly.io# Mid-size containers -> AWS Fargate / GCP Cloud Run# Enterprise multi-region -> EKS/GKE/AKS + Argo CD / Flux# application-prod.yml (portable across clouds)spring:datasource:url: ${DB_URL}username: ${DB_USER}password: ${DB_PASSWORD}management:endpoint:health:probes:enabled: truehealth:livenessstate:enabled: truereadinessstate:enabled: true# Deploy contract# 1) CI builds techlearningpro/orders:$GIT_SHA# 2) Platform pulls image + injects env# 3) Smoke /actuator/health then promote
Real-world use
TechLearningPRO early Orders lived on a single EC2 with docker-compose. Friday deploys meant SSH. Moving to Cloud Run for the API and managed SQL cut deploy time from forty minutes to five and removed 'which host has the new jar?' pages from the incident channel.
Security implications
Cloud accounts are production.
- Least-privilege IAM/roles for deploy pipelines — prefer OIDC federation.
- Private networking for databases; public only the Ingress/load balancer.
- Store credentials in the platform secret store referenced as
${DB_PASSWORD}.
Best practices
- Start simpler; graduate platforms when pain is real.
- Keep domain code cloud-agnostic; isolate cloud SDKs at adapters.
- GitOps or at least audited pipelines for anything beyond a hobby PaaS.
Common mistakes
- Choosing EKS because it looks good on a résumé when the team cannot operate it.
- Self-hosting Postgres on day one without backups.
- Cloud-specific SDKs woven through domain code so migration hurts.
Advanced interview questions
Interview Prep
Practice concise answers, then expand each card for the explanation.
1BeginnerQuestionHow should a small team deploy Boot microservices first?+
Answer
2IntermediateQuestionWhat keeps a Boot 3 app portable across clouds?+
Answer
3BeginnerQuestionWhy managed Postgres on day one?+
Answer
Hands-on exercise
Lab. Write a one-page runbook: pick PaaS vs Fargate vs EKS for Orders given a 4-person team and one region. List required managed services and the exact env vars Orders needs to boot.
Summary
Cloud deployment choices set the ops ceiling for TechLearningPRO Orders. Next: master Docker fundamentals that every path still depends on.