Problem Statement
Explain the difference between vertical scaling and horizontal scaling in Kubernetes and provide example use-cases for each.
Explanation
Horizontal scaling means adding or removing pod replicas (scale-out) to handle variable load; vertical scaling means increasing CPU/memory of existing pods (scale-up). Example: a stateless web service might use HPA to horizontally scale out when traffic surges; a stateful analytics job might use vertical scaling if the workload remains on one pod but needs more memory and CPU. Choosing the right approach depends on application architecture and workload characteristics.
