Kubernetes Architect | Integration Expert | TIBCO Guru

FEATURED STORIES

Kubernetes Architect | Integration Expert | TIBCO Guru

Kubernetes HPA on Memory: Working Examples, CPU + Memory Combined, and Troubleshooting

You can scale a Deployment on memory with a plain autoscaling/v2 HorizontalPodAutoscaler and no extra tooling: set a Resource metric named memory, give every container a memory request, and have metrics-server running. The manifest below does exactly that. The rest of this article is about what the HPA actually does with that manifest — how the number is computed, what changes when you add CPU next to it, why it scales down slower than you expect, and what every error message in kubectl describe hpa means. apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: worker-memory namespace: default spec: scaleTargetRef: apiVersion: apps/v1 kind:…