Setting up a OpenShift cluster
Introduction
This guide is helpful in setting up a development environment intended to be used with odo
; this setup is not recommended for a production environment.
Prerequisites
- You have a OpenShift cluster set up (such as crc)
- You have admin privileges to the cluster
Summary
- An Operator in order to use
odo service
- (Optional) Service Binding Operator in order to use
odo link
Installing an Operator
Installing an Operator allows you to install a service such as PostgreSQL, Redis or DataDog.
To install an Operator from the OpenShift web console:
- Login to the OpenShift web console with admin, and navigate to Operators > OperatorHub.
- Make sure that the Project is set to All Projects.
- Search for an Operator of your choice in the search box under All Items.
- Click on the Operator; this should open a side pane.
- Click on the Install button on the side pane; this should open an Install Operator page.
- Set the Installation mode, Installed Namespace and Approval Strategy as per your requirement.
- Click on the Install button.
- Wait until the Operator is installed.
- Once the Operator is installed, you should see Installed operator - ready for use, and a View Operator button appears on the page.
- Click on the View Operator button; this should take you to Operators > Installed Operators > Operator details page, and you should be able to see details of your Operator.
Verifying the Operator installation
Once the Operator is successfully installed on the cluster, you can use odo
to verify the Operator installation and see the CRDs associated with it; run the following command:
odo catalog list services
The output may look similar to:
odo catalog list services
Services available through Operators
NAME CRDs
datadog-operator.v0.6.0 DatadogAgent, DatadogMetric, DatadogMonitor
service-binding-operator.v0.9.1 ServiceBinding, ServiceBinding
(Optional) Installing the Service Binding Operator
odo
uses Service Binding Operator to provide the odo link
feature which helps to connect an odo component to a service or another component.
The Service Binding Operator is optional and is used to provide extra metadata support for odo
deployments.
To install the Service Binding Operator from the OpenShift web console:
- Login to the OpenShift web console with admin, and navigate to Operators > OperatorHub.
- Make sure that the Project is set to All Projects.
- Search for Service Binding Operator in the search box under All Items.
- Click on the Service Binding Operator; this should open a side pane.
- Click on the Install button on the side pane; this should open an Install Operator page.
- Make sure the Installation mode is set to "All namespaces on the cluster(default)"; Installed Namespace is set to "openshift-operators"; and Approval Strategy is "Automatic".
- Click on the Install button.
- Wait until the Operator is installed.
- Once the Operator is installed, you should see Installed operator - ready for use, and a View Operator button appears on the page.
- Click on the View Operator button; this should take you to Operators > Installed Operators > Operator details page, and you should be able to see details of your Operator.