Configure Shell Access
Last updated
Was this helpful?
Last updated
Was this helpful?
To easily connect to the cluster, you need the OpenShift CLI oc
that exposes commands for managing your applications, as well as lower level tools to interact with each component of your system.
This topic guides you through getting started with the CLI, including installation and logging in.
To avoid installing the command line, the recommended approach is to use the IBM Cloud Shell is a cloud-based shell workspace that you can access through your browser.
It's preconfigured with the full IBM Cloud CLI and tons of plug-ins and tools that you can use to manage apps, resources, and infrastructure.
In the Console menu bar, click the IBM Cloud Shell icon to start a session
A session starts and automatically logs you in through the IBM Cloud CLI.
In the OpenShift web console, click on the email/ID in the upper right. Choose the Copy Login Command option.
In a Shell termimal, paste the login command you copied from the web console.
You should see a success message similar to the one below:
Your CLI is now connected to your Red Hat OpenShift cluster running in IBM Cloud.
oc
commandsView nodes in the cluster.
View services, deployments, and pods.
View projects
You've completed the getting started! Let's recap -- in this section, you:
Got an OpenShift cluster and accessed its Web Console.
Connected your local CLI to a running OpenShift cluster on IBM Cloud
The oc
CLI will be the main mechanism to interact with your OpenShift cluster. We'll be downloading and installing the CLI, and adding it to your environment path.
Download the oc
tarball.
Unpack the tarball
Rename it for ease of use
Update PATH
.
NOTE: If you restart your cloud shell, you may need to re-run this command.
Verify the utility is available by using which
and the help command.
NOTE: Check for newer releases on the page.