Skip to content

Instantly share code, notes, and snippets.

Last active June 12, 2020 12:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Getting started with OpenShift

Getting Started with OpenShift

I’m going to show the basics of how to manage an OpenShift cluster using the command-line tool, oc.

Download the tool

Replace linux-aarch64 in the following command with your architecture: linux or macosx


Windows users:

wget -o

Unpack and place in your PATH. To check your PATH on Linux or macOS, open the Terminal and run:

echo $PATH

Windows users, extract with 7z x and move oc.exe to your Desktop

Login with oc

Sign up for OpenShift Online Starter at Click on your user profile name at the top right, then “Copy Login Command”. Paste this login command in your shell.

Start new project and app

Source app taken from Red Hat’s Getting Started with Python blogpost.

oc new-project sample-flask-app
oc new-app --name=sample-flask-app

The tool will inspect the source code, locate an appropriate image that can build the source code, create an image stream for the new application image that will be built, then create the correct build configuration, deployment configuration and service definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment