FahamLah

Commands

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=100m

Book a tenth of a CPU, not 64.

$ kubectl set resources deployment shop --limits=memory=128Mi

Cap each tray at 128Mi of memory.