Installing odo
You can install the odo
CLI on Linux, Windows, or macOS by downloading a binary. You can also install the OpenShift VS Code extension, which uses both the odo
and the oc
binaries to interact with your OpenShift Container Platform cluster. For Fedora, you can install the odo
CLI as an RPM.
Currently, |
Installing odo on Linux
The odo
CLI is available to download as a binary and as a tarball for multiple operating systems and architectures including:
Operating System | Binary | Tarball |
---|---|---|
Linux | ||
Linux on IBM Power | ||
Linux on IBM Z and LinuxONE |
Procedure
Navigate to the content gateway and download the appropriate file for your operating system and architecture.
If you download the binary, rename it to
odo
:$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o odo
If you download the tarball, extract the binary:
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64.tar.gz -o odo.tar.gz
$ tar xvzf odo.zip
Change the permissions on the binary:
$ chmod +x <filename>
Place the
odo
binary in a directory that is on yourPATH
.To check your
PATH
, execute the following command:$ echo $PATH
Verify that
odo
is now available on your system:$ odo version
Installing odo on Windows
The odo
CLI for Windows is available to download as a binary and as an archive.
Operating System | Binary | Tarball |
---|---|---|
Windows |
Procedure
Navigate to the content gateway and download the appropriate file:
If you download the binary, rename it to
odo.exe
.If you download the archive, unzip the binary with a ZIP program and then rename it to
odo.exe
.
Move the
odo.exe
binary to a directory that is on yourPATH
.To check your
PATH
, open the command prompt and execute the following command:C:\> path
Verify that
odo
is now available on your system:C:\> odo version
Installing odo on macOS
The odo
CLI for macOS is available to download as a binary and as a tarball.
Operating System | Binary | Tarball |
---|---|---|
macOS |
Procedure
Navigate to the content gateway and download the appropriate file:
If you download the binary, rename it to
odo
:$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64 -o odo
If you download the tarball, extract the binary:
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64.tar.gz -o odo.tar.gz
$ tar xvzf odo.tar.gz
Change the permissions on the binary:
# chmod +x odo
Place the
odo
binary in a directory that is on yourPATH
.To check your
PATH
, execute the following command:$ echo $PATH
Verify that
odo
is now available on your system:$ odo version
Installing odo on VS Code
The OpenShift VS Code extension uses both odo
and the oc
binary to interact with your OKD cluster. To work with these features, install the OpenShift VS Code extension on VS Code.
Prerequisites
- You have installed VS Code.
Procedure
Open VS Code.
Launch VS Code Quick Open with
Ctrl
+P
.Enter the following command:
$ ext install redhat.vscode-openshift-connector
Installing odo on Fedora using an RPM
For Fedora, you can install the odo
CLI as an RPM.
Procedure
Register with Red Hat Subscription Manager:
# subscription-manager register
Pull the latest subscription data:
# subscription-manager refresh
List the available subscriptions:
# subscription-manager list --available --matches '*OpenShift Developer Tools and Services*'
In the output of the previous command, find the
Pool ID
field for your OKD subscription and attach the subscription to the registered system:# subscription-manager attach --pool=<pool_id>
Enable the repositories required by
odo
:# subscription-manager repos --enable="ocp-tools-4.10-for-rhel-8-x86_64-rpms"
Install the
odo
package:# yum install odo
Verify that
odo
is now available on your system:$ odo version