Resource Optimization
Purpose: For platform engineers, provides guidance on right-sizing workloads, configuring autoscaling, and managing resource quotas across multi-tenant clusters.
Right-Sizing Worker Pools
Use dedicated node pools for different workload profiles:
| Pool | Instance Profile | Use Case |
|---|---|---|
system | 4 vCPU / 16 GB | Platform services (observability, security, GitOps) |
general | 8 vCPU / 32 GB | Stateless application workloads |
memory | 4 vCPU / 64 GB | Caches, in-memory databases |
compute | 16 vCPU / 32 GB | Batch processing, CI runners |
Horizontal Pod Autoscaling (HPA)
openCenter clusters ship with metrics-server pre-installed. Configure HPA using standard Kubernetes resources:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: app-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app
minReplicas: 2
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
Vertical Pod Autoscaling (VPA)
Deploy VPA in recommendation mode to identify right-sizing opportunities without automatic mutation:
updatePolicy:
updateMode: "Off" # Recommendations only
Resource Quotas for Multi-Tenancy
Enforce per-namespace quotas to prevent noisy-neighbor problems:
| Resource | Recommended Default | Notes |
|---|---|---|
requests.cpu | 8 cores | Per namespace |
requests.memory | 32 Gi | Per namespace |
limits.cpu | 16 cores | 2× requests for burst |
persistentvolumeclaims | 20 | Prevent storage exhaustion |
services.loadbalancers | 2 | MetalLB IP conservation |
LimitRange Best Practices
Set default requests/limits so pods without resource specs don't consume unbounded resources:
apiVersion: v1
kind: LimitRange
metadata:
name: default-limits
spec:
limits:
- default:
cpu: 500m
memory: 512Mi
defaultRequest:
cpu: 100m
memory: 128Mi
type: Container