Complete OpenShift keyboard shortcuts and commands reference — 16 shortcuts across 2 categories. Quick reference cheat sheet for Windows & Mac.
oc is OpenShift's command-line client, a superset of kubectl: every kubectl command works, and oc adds the project, build and route concepts that OpenShift layers on Kubernetes. The table covers the commands a developer runs in a day; the notes explain which ones are OpenShift-specific and what they map to underneath.
| Shortcut | Action |
|---|---|
| oc login <url> | Login |
| oc project <name> | Switch project |
| oc new-project <name> | Create project |
| oc get pods | List pods |
| oc get all | Get all resources |
| oc describe pod <name> | Describe pod |
| oc logs <pod> | View logs |
| oc rsh <pod> | Remote shell |
| Shortcut | Action |
|---|---|
| oc new-app <image> | New app |
| oc new-app --from-git <url> | App from Git |
| oc start-build <buildconfig> | Start build |
| oc rollout status dc/<name> | Rollout status |
| oc rollout latest dc/<name> | Trigger deploy |
| oc rollout undo dc/<name> | Rollback |
| oc scale dc/<name> --replicas=3 | Scale |
| oc expose svc/<name> | Expose route |
The most essential OpenShift shortcuts are: oc login <url> (Login), oc project <name> (Switch project), oc new-project <name> (Create project).
The OpenShift shortcut for login is oc login <url>.
Yes — use My Stack to combine OpenShift shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.
oc login <url> authenticates against the cluster API — the console's "Copy login command" produces the exact line with a token — and oc project <name> switches the current project, which is a Kubernetes namespace with extra RBAC and quota attached. oc new-project <name> creates one. From there oc get pods, oc get all, oc describe pod <name> and oc logs <pod> behave exactly as their kubectl equivalents, and oc rsh <pod> opens a shell in a container without needing to know the exec syntax.
oc new-app <image> creates a deployment, service and image stream from a container image in one step, and oc new-app --from-git <url> does the same from source, detecting the language and building with a source-to-image builder. oc start-build <buildconfig> triggers a rebuild. oc rollout status dc/<name> waits for a rollout to finish, oc rollout latest dc/<name> forces a new one and oc rollout undo dc/<name> rolls back. Note the dc/ prefix: those rows target DeploymentConfigs, the older OpenShift object; newer projects use standard Deployments and the same commands with deployment/.
oc expose svc/<name> creates a Route, OpenShift's built-in ingress, and prints a hostname on the cluster's domain — the step that makes an app reachable without writing an Ingress resource. oc scale dc/<name> --replicas=3 changes replica count directly. For anything the table does not cover, oc explain and oc get -o yaml show the objects, and oc adm holds the administrator commands.
Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"