High-Availability Control Plane & Worker Nodes
- Managed EKS Control Plane: Automatic multi-AZ redundancy with automated etcd encryption and Raft quorum consistency across three AWS regions.
- AWS VPC CNI Plugin: Assigns VPC IP addresses directly to Pod ENIs, eliminating double-NAT packet overhead for microservice inter-communication.
- Topology Spread Constraints: Uses
topologyKey: topology.kubernetes.io/zonewithmaxSkew: 1to guarantee even pod distribution across zones. - Pod Disruption Budgets (PDB): Guarantees
minAvailable: 75%during cluster node upgrades and Karpenter auto-scaling drains.
Lifecycle Probes & Graceful Draining
- Startup Probe: Guards slow-starting JVM/Node runtimes with
failureThreshold: 30andperiodSeconds: 5, preventing premature pod termination. - Readiness Probe: Tests endpoint health on
/healthz/ready. Removes degraded pods from ALB target groups in under 3 seconds. - Graceful Draining Hook: Executes
preStop: sleep 15to allow ALB target groups time to deregister connections before sendingSIGTERM. - Resource Quotas & Limits: Guarantees Quality of Service (QoS) class
Guaranteedfor mission-critical core transactional APIs.
apiVersion: apps/v1
kind: Deployment
metadata:
name: order-processing-api
namespace: production
labels:
app.kubernetes.io/name: order-api
app.kubernetes.io/part-of: cloud-platform
spec:
replicas: 6
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 0
selector:
matchLabels:
app: order-api
template:
metadata:
labels:
app: order-api
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: order-api
containers:
- name: app
image: 60091670961.dkr.ecr.us-east-1.amazonaws.com/order-api:v2.4.1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
resources:
requests:
cpu: "500m"
memory: "512Mi"
limits:
cpu: "2000m"
memory: "2Gi"
readinessProbe:
httpGet:
path: /health/ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 3
livenessProbe:
httpGet:
path: /health/live
port: 8080
initialDelaySeconds: 15
periodSeconds: 10
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "sleep 15"]