Kubernetes Workloads Cheat Sheet/Set deployment resources

Update requests and limits from the CLI.

Section: Deployments

Set deployment resources

bash
bash
kubectl set resources deployment/web -c web --limits=cpu=500m,memory=512Mi --requests=cpu=200m,memory=256Mi -n payments
Explanation

Update requests and limits from the CLI.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Deployments
List deployments
Show deployments across namespaces.
OpenIn sheetbashsame section
Describe deployment
Inspect rollout state, replicas, and events.
OpenIn sheetbashsame section
Update deployment image
Roll out a new container image.
OpenIn sheetbashsame section
Set environment variable
Set or update environment variables.
OpenIn sheetbashsame section
Watch rollout status
Block until the rollout finishes or fails.
OpenIn sheetbashsame section
Show rollout history
List deployment revisions.
OpenIn sheetbashsame section