Setup an OpenShift cluster
Note that this guide is only helpful in setting up a development environment; this setup is not recommended for a production environment.
#
Prerequisites- You have an OpenShift cluster setup, this could for example be a crc cluster.
- You have admin privileges to the cluster, since Operator installation is only possible with an admin user.
What are Operators?
The Operator pattern aims to capture the key aim of a human operator who is managing a service or set of services. Human operators who look after specific applications and services have deep knowledge of how the system ought to behave, how to deploy it, and how to react if there are problems.
People who run workloads on Kubernetes often like to use automation to take care of repeatable tasks. The Operator pattern captures how you can write code to automate a task beyond what Kubernetes itself provides. (Source)
#
Installing the Service Binding Operatorodo uses Service Binding Operator to provide the odo link
feature which helps connect an odo component to a service or another component.
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.
#
Installing an OperatorTo 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 installationOnce the Operator is successfully installed on the cluster, you can also use odo
to verify the Operator installation and see the CRDs associated with it; run the following command:
odo catalog list services
The output can look similar to:
$ odo catalog list servicesServices available through OperatorsNAME CRDs datadog-operator.v0.6.0 DatadogAgent, DatadogMetric, DatadogMonitorservice-binding-operator.v0.9.1 ServiceBinding, ServiceBinding