Challenge
DifficultyEasy
Learner activity No attempts yet

Troubleshoot HPA Pod Scaling Blocked by ResourceQuota

A ResourceQuota is limiting pod count to 1 in the finops namespace, preventing the HPA from scaling the billing-api deployment to its minimum of 3 pods. Identify the conflict and update the ResourceQuota to allow the HPA to function correctly.

Scenario

The billing-api service is running in the finops namespace with a Horizontal Pod Autoscaler (HPA) configured. However, the deployment is not reaching the HPA minimum replica count and remains at 1 pod.

Investigate the ResourceQuota configuration, identify what is causing the scaling issue according to the HPA configuration, and fix it.


Task

The billing-api deployment has an HPA configured with:

  • minReplicas: 3
  • maxReplicas: 10

Inspect the ResourceQuota in the namespace, determine what is causing autoscaling issues according to the HPA configuration, and make the necessary changes so the deployment can scale according to the configured HPA range.

Important

Wait approximately 1 minute for the environment setup and HPA metrics collection to complete.

Do not delete or modify the HPA or Deployment.


Hint

When pods are not scaling as expected, check not just the HPA but also any namespace-level policies that could be restricting pod creation.

# check HPA status and events
kubectl describe hpa billing-api-hpa -n finops

# list all resources in the namespace
kubectl get all -n finops

# check namespace-level restrictions
kubectl get resourcequota -n finops
kubectl describe resourcequota -n finops

Test Cases

Problem
Solution
Start