Cheatsheet Pages / kubectl Cheatsheet

How to deploy or update from a manifest — kubectl apply -f

You have a manifest file and want the cluster to match what it declares.

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 apply -f app.yaml     # create or update whatever the file declares
kubectl apply -f ./k8s/       # a whole directory of manifests
kubectl Cheatsheet one-page card — commands that actually work
The full one-page card — kubectl Cheatsheet. Get the complete cheatsheet on GitHub