LinuxCommandLibrary

oc

The OpenShift Container Platform CLI.

TLDR

Log in to the OpenShift Container Platform server

$ oc login
copy


Create a new project
$ oc new-project [project_name]
copy


Switch to an existing project
$ oc project [project_name]
copy


Add a new application to a project
$ oc new-app [repo_url] --name [application]
copy


Open a remote shell session to a container
$ oc rsh [pod_name]
copy


List pods in a project
$ oc get pods
copy


Log out from the current session
$ oc logout
copy

Copied to clipboard