Production deployment mode targeting managed Kubernetes clusters (EKS / GKE / AKS). Applies prod-grade sizing, autoscaling, disruption budgets, and TLS on top of the shared service base.
- Base layer
../../base— 18 Spring Boot app Deployments + Services + Ingress
- Overlay additions
hpa.yaml— HorizontalPodAutoscaler per scaling-friendly service. search-batch (scheduled job) and agent-viewer-api (internal dev tool) are intentionally excluded.pdb.yaml— PodDisruptionBudgetminAvailable: 1per service. Combined with HPAminReplicas: 2this gives rolling headroom during node drains and cluster upgrades.
- Overlay patches
patches/replicas.yaml— every app Deployment scales to 2 replicas as the HPA minimum.patches/resources.yaml— requests 200m CPU / 1 GiB memory, limits 2 CPU / 2 GiB memory per container.patches/ingress-tls.yaml— gateway Ingress switches to HTTPS with a cert-managerletsencrypt-prodClusterIssuer andapi.commerce.example.comhost. Change the host to your real domain before applying.
This overlay intentionally does not pull in any infrastructure from
k8s/infra/local/. Production backing services (Kafka, MySQL, Redis,
Elasticsearch, ClickHouse) come from Operator-managed
stacks under k8s/infra/prod/, which is Phase 4 of the migration
(ADR-0019) and arrives in a later commit.
Prerequisites installed separately:
- ingress-nginx controller
- cert-manager +
letsencrypt-prodClusterIssuer - Phase 4
k8s/infra/prod/(Strimzi Kafka, Percona MySQL, ECK Elasticsearch, ClickHouse Operator, SealedSecrets, kube-prometheus- stack)
# Dry run — just render and diff against the cluster.
kubectl kustomize k8s/overlays/prod-k8s | kubectl diff -f -
# Real apply.
kubectl apply -k k8s/overlays/prod-k8s- Edit
patches/ingress-tls.yamlto replaceapi.commerce.example.comwith your production hostname. - Confirm cert-manager ClusterIssuer name matches
letsencrypt-prodor adjust the annotation. - Adjust HPA min/max replicas per service based on expected load.
- Wire Secrets via SealedSecrets or External Secrets (Phase 4) instead of the plaintext defaults in application-kubernetes.yml.
- Set
jibRegistryto your push target and build images with./gradlew jib -PjibRegistry=<region>.ocir.io/<namespace>(or your registry). Update the image pull references if your registry is private. - Size CPU/memory limits per real metrics once kube-prometheus- stack data is available.
kubectl delete -k k8s/overlays/prod-k8sNote: HPAs and PDBs are owned by this overlay, but the Deployments
and Services from base are also deleted. Infrastructure from
k8s/infra/prod/ must be deleted separately.