Cheatsheet Pages / kubectl Cheatsheet

How to list and create namespaces — kubectl get ns / create namespace

You want to see the namespaces in the cluster, or create a fresh one for a new environment.

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 get ns                     # list namespaces (ns = the short name)
kubectl create namespace dev       # make a new one
kubectl Cheatsheet one-page card — commands that actually work
The full one-page card — kubectl Cheatsheet. Get the complete cheatsheet on GitHub