Cheatsheet Pages / kubectl Cheatsheet

How to update a deployment's image — kubectl set image

A new image version is ready and the deployment should roll over to it.

Placeholders follow the cheatsheet: web is a deployment/pod name and app.yaml is your manifest. Most commands act on the current namespace — add -n <ns> to target another one.

kubectl set image deployment/web web=nginx:1.28   # syntax: container-name=new-image

Good to know

Bumping the image triggers a rolling update.

kubectl Cheatsheet one-page card — commands that actually work
The full one-page card — kubectl Cheatsheet. Get the complete cheatsheet on GitHub