oc Cheat Sheet
published
oc is the primary command line for OpenShift. It includes tools to build, deploy, and administer containers.
Logging in
Switch to a specific project or log in directly to a project:
Building and deploying applications
Build code or a Dockerfile in a Git repo:
Build from a template:
Create other objects from a file:
Update an existing object:
Accessing running applications
Common commands
Scaling applications
Administrative operations using the adm subcommand
Manage user roles:
Manage node state:
Run cluster diagnostics:
Advanced operations
Create a config map file and mount it as a volume to a deployment config:
Create a secret from the CLI and mount it as a volume to a deployment config:
Get OpenShift in Action