kubectl set resources deployment/<name>
kubectl set resources deployment/<name> [--requests=cpu=…,memory=…] [--limits=cpu=…,memory=…]
Risk: Careful
What it does
Changes the requests and limits in the pod template. A rolling update starts.
When to use it
A tray asks for too much room, or needs a cap.
Example
$ kubectl set resources deployment big --requests=cpu=100mBook a tenth of a CPU, not 64.
$ kubectl set resources deployment shop --limits=memory=128MiCap each tray at 128Mi of memory.
Learn it in: Requests and limits · Official docs