How to fix minimum cpu usage per Container in Kubernetes
This error occurs when a container's CPU request is below the namespace LimitRange minimum. Fix it by increasing the CPU request to meet or exceed the minimum constraint defined in the LimitRange.
Quick fix
Fixes minimum cpu usage per Container
kubectl get limitrange -n <namespace>
kubectl describe limitrange <name> -n <namespace>- Check LimitRange in namespace
- Identify the conflicting container
- Update container CPU request to meet minimum
- Update Deployment template
kubectl get limitrange -n <namespace>kubectl describe limitrange <name> -n <namespace>minimum cpu usage per Container
What this error means
The "minimum cpu usage per Container" error indicates that your container's CPU request is below the minimum threshold enforced by a LimitRange in the namespace. LimitRanges set constraints on resource requests and limits that all containers must satisfy. When a LimitRange specifies a minimum CPU (e.g., 200m), any container requesting less than that amount will be rejected at admission time. This ensures all workloads in the namespace have a baseline level of resources. This error occurs at Pod admission—the API server validates the Pod spec against LimitRange constraints before accepting it. Existing pods are unaffected by LimitRange changes.
Typical symptoms
- Pod creation fails with "must be greater than or equal to" error
- HTTP 403 Forbidden from admission controller
- Deployments stuck in pending state
- Error message shows minimum value and your requested value
- kubectl describe pod shows no scheduling events (rejected before scheduling)
Common causes
- Container CPU request below LimitRange minimum
- Missing CPU request and LimitRange has no defaultRequest
- LimitRange minimum increased after manifest was created
- Multi-container pod where one container violates minimum
- Inherited defaults conflict with minimum constraints
How to fix "minimum cpu usage per Container"
View the LimitRange constraints:
kubectl get limitrange -n <namespace>
kubectl describe limitrange <name> -n <namespace>Output shows:
- min.cpu: Minimum CPU request allowed
- max.cpu: Maximum CPU limit allowed
- default: Default limit applied
- defaultRequest: Default request applied
Check which container violates the minimum:
# Try to apply and see detailed error
kubectl apply -f pod.yaml
# Check pod events if partially created
kubectl describe pod <pod-name> -n <namespace>Error message will show the container name and values.
Increase the CPU request to satisfy the LimitRange:
# Before (fails if min.cpu is 200m)
resources:
requests:
cpu: 100m
# After (meets minimum)
resources:
requests:
cpu: 200m
memory: 128Mi
limits:
cpu: 500m
memory: 256MiApply the corrected manifest:
kubectl apply -f pod.yaml -n <namespace>For Deployments, update the pod template:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
template:
spec:
containers:
- name: app
image: my-image
resources:
requests:
cpu: 250m # Above minimum (200m)
memory: 256Mi
limits:
cpu: 1000m
memory: 1GiRedeploy:
kubectl apply -f deployment.yaml
kubectl rollout status deployment/my-app -n <namespace>Confirm the pod was created with correct resources:
kubectl get pods -n <namespace> -w
# Verify resource allocation
kubectl describe pod <pod-name> -n <namespace> | grep -A3 "Requests"Should show CPU request meeting or exceeding the minimum.
If the minimum is too high for your workload, request admin change:
apiVersion: v1
kind: LimitRange
metadata:
name: cpu-limit-range
namespace: <namespace>
spec:
limits:
- type: Container
min:
cpu: 100m # Lowered from 200m
max:
cpu: 2
default:
cpu: 500m
defaultRequest:
cpu: 100mAdmin applies the updated LimitRange. Only affects new pods.
Advanced notes
LimitRange Types:
- Container: Per-container constraints
- Pod: Total across all containers
- PersistentVolumeClaim: Storage size constraints
Default Fields:
- min: Hard floor—requests cannot be lower
- max: Hard ceiling—limits cannot be higher
- default: Applied as limit if not specified
- defaultRequest: Applied as request if not specified
- maxLimitRequestRatio: Maximum ratio of limit/request
Key Behaviors:
- LimitRange validation happens only at Pod admission
- Existing pods are unaffected by LimitRange changes
- Limits must always be >= requests
- Each container in multi-container pods must independently meet constraints
Common Real-World Minimums:
- Development: 50m CPU, 32Mi memory
- Production: 250m CPU, 256Mi memory
Frequently asked questions
- What does "minimum cpu usage per Container" mean?
- The "minimum cpu usage per Container" error indicates that your container's CPU request is below the minimum threshold enforced by a LimitRange in the namespace. LimitRanges set constraints on resource requests and limits that all containers must satisfy. , 200m), any container requesting less than that amount will be rejected at admission time.
- How do I fix "minimum cpu usage per Container"?
- This error occurs when a container's CPU request is below the namespace LimitRange minimum. Fix it by increasing the CPU request to meet or exceed the minimum constraint defined in the LimitRange.
- What causes "minimum cpu usage per Container"?
- Container CPU request below LimitRange minimum Missing CPU request and LimitRange has no defaultRequest LimitRange minimum increased after manifest was created
- Is the "minimum cpu usage per Container" error serious?
- It is a low-severity error — more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- 📚Kubernetes Official Documentation
- 📖Kubernetes Docs: Limit Ranges(Official Docs)
- 📖Kubernetes Docs: Default Memory Limits(Official Docs)
- 💬Stack Overflow: Kubernetes LimitRange configuration(Stack Overflow)