Chapter 3. Service brokers


3.1. Installing Service Catalog

Important

Service Catalog is deprecated in OpenShift Container Platform 4. Equivalent and better functionality is present in the Operator Framework and Operator Lifecycle Manager (OLM).

Important

Starting in OpenShift Container Platform 4.4, the service-catalog-controller-manager and service-catalog-apiserver cluster Operators are now set to Upgradeable=false. This means that they will block future cluster upgrades to the next minor version, for example 4.5, if they are still installed at that time. Upgrading to z-stream releases such as 4.4.z, however, are still permitted in this state.

3.1.1. About Service Catalog

When developing microservices-based applications to run on cloud native platforms, there are many ways to provision different resources and share their coordinates, credentials, and configuration, depending on the service provider and the platform.

To give developers a more seamless experience, OpenShift Container Platform includes Service Catalog, an implementation of the Open Service Broker API (OSB API) for Kubernetes. This allows users to connect any of their applications deployed in OpenShift Container Platform to a wide variety of service brokers.

Service Catalog allows cluster administrators to integrate multiple platforms using a single API specification. The OpenShift Container Platform web console displays the cluster service classes offered by service brokers in Service Catalog, allowing users to discover and instantiate those services for use with their applications.

As a result, service users benefit from ease and consistency of use across different types of services from different providers, while service providers benefit from having one integration point that gives them access to multiple platforms.

Important

Service Catalog is not installed by default in OpenShift Container Platform 4.

3.1.2. Installing Service Catalog

If you plan on using any of the services from the Template Service Broker, you must install Service Catalog by completing the following steps.

The custom resources for Service Catalog’s API server and controller manager are created by default in OpenShift Container Platform, but initially have a managementState of Removed. To install Service Catalog, you must change the managementState for these resources to Managed.

Procedure

  1. Enable Service Catalog’s API server.

    1. Use the following command to edit Service Catalog’s API server resource.

      $ oc edit servicecatalogapiservers
    2. Under spec, set the managementState field to Managed:

      spec:
        logLevel: Normal
        managementState: Managed
    3. Save the file to apply the changes.

      The Operator installs Service Catalog’s API server component. As of OpenShift Container Platform 4, this component is installed into the openshift-service-catalog-apiserver namespace.

  2. Enable Service Catalog’s controller manager.

    1. Use the following command to edit Service Catalog’s controller manager resource.

      $ oc edit servicecatalogcontrollermanagers
    2. Under spec, set the managementState field to Managed:

      spec:
        logLevel: Normal
        managementState: Managed
    3. Save the file to apply the changes.

      The Operator installs Service Catalog’s controller manager component. As of OpenShift Container Platform 4, this component is installed into the openshift-service-catalog-controller-manager namespace.

  3. Verify that the installation is completed successfully by checking that Service Catalog appears in the left navigation of the web console.

3.2. Uninstalling Service Catalog

Important

Starting in OpenShift Container Platform 4.4, the service-catalog-controller-manager and service-catalog-apiserver cluster Operators are now set to Upgradeable=false. This means that they will block future cluster upgrades to the next minor version, for example 4.5, if they are still installed at that time. Upgrading to z-stream releases such as 4.4.z, however, are still permitted in this state.

You can uninstall Service Catalog if you have installed it previously. Service Catalog must be removed before the cluster can upgrade to future minor versions of OpenShift Container Platform.

3.2.1. Uninstalling Service Catalog

If Service Catalog is installed, cluster administrators can uninstall it by using the following procedure.

Warning

Uninstalling Service Catalog will impact any service brokers and provisioned services from those brokers, such as the Template Service Broker, in your cluster.

Prerequisites

  • Service Catalog is installed.

Procedure

  1. Using an account with cluster-admin privileges, edit the servicecatalogcontrollermanagers resource:

    $ oc edit servicecatalogcontrollermanagers
  2. Change the managementState parameter from Managed back to the default Removed, and save your changes.
  3. Edit the servicecatalogapiservers resource:

    $ oc edit servicecatalogapiservers
  4. Change the managementState parameter from Managed back to the default Removed, and save your changes.
  5. Verify that the removal is completed successfully by checking that Service Catalog is removed from the left navigation of the web console.

3.3. Installing the Template Service Broker

You can install the Template Service Broker to gain access to the template applications that it provides.

Important

The Template Service Broker is deprecated in OpenShift Container Platform 4. Equivalent and better functionality is present in the Operator Framework and Operator Lifecycle Manager (OLM).

Note

By default, the Samples Operator handles Red Hat Enterprise Linux (RHEL)-based OpenShift Container Platform imagestreams and OpenShift Container Platform templates. See Configuring the Samples Operator for details.

3.3.1. About the Template Service Broker

The Template Service Broker gives Service Catalog visibility into the default Instant App and Quickstart templates that have shipped with OpenShift Container Platform since its initial release. The Template Service Broker can also make available as a service anything for which an OpenShift Container Platform template has been written, whether provided by Red Hat, a cluster administrator or user, or a third-party vendor.

By default, the Template Service Broker shows objects that are globally available from the openshift project. It can also be configured to watch any other project that a cluster administrator chooses.

Important

The Template Service Broker is not installed by default in OpenShift Container Platform 4.

3.3.2. Installing the Template Service Broker Operator

Prerequisites

  • Service Catalog is installed.

Procedure

The following procedure installs the Template Service Broker Operator using the web console.

  1. Create a namespace.

    1. Using the Administrator perspective, navigate in the web console to Administration Namespaces and click Create Namespace.
    2. Enter the following:

      • openshift-template-service-broker in the Name field

        Note

        The namespace must start with openshift-.

      • openshift.io/cluster-monitoring=true in the Labels field
    3. Click Create.
  2. Navigate to the Operators OperatorHub page. Verify that the openshift-template-service-broker project is selected.
  3. Select Template Service Broker Operator.
  4. Read the information about the Operator and click Install.
  5. Review the default selections and click Subscribe.

Next, you must start the Template Service Broker in order to access the template applications it provides.

3.3.3. Starting the Template Service Broker

After you have installed the Template Service Broker Operator, you can start the Template Service Broker using the following procedure.

Prerequisites

  • Service Catalog is installed.
  • The Template Service Broker Operator is installed.

Procedure

  1. Using the Administrator perspective, navigate in the web console to Operators Installed Operators and select the openshift-template-service-broker project.
  2. Select the Template Service Broker Operator.
  3. Under Provided APIs, click Create Instance for Template Service Broker.
  4. Review the default YAML and click Create.
  5. Verify that the Template Service Broker starts correctly by checking that the template applications are available.

    • To check from the web console, navigate to Service Catalog Broker Management Service Classes to view the list of template application service classes.
    • To check from the CLI:

      $ oc get ClusterServiceClasses -n openshift-template-service-broker
    Note

    It may take a few minutes for the Template Service Broker to start and the template applications to be available.

    If you do not yet see these service classes, you can check the status of the following items:

    • Template Service Broker Pod status

      • From the Workloads Pods page for the openshift-template-service-broker project, verify that the Pod that starts with apiserver- has a status of Running and readiness of Ready.
    • Cluster service broker status

      • From the Service Catalog Broker Management Service Brokers page, verify that the template-service-broker service broker has a status of Ready.
    • Service Catalog controller manager Pod logs

      • From the Workloads Pods page for the openshift-service-catalog-controller-manager project, review the logs for each of the Pods and verify that you see a log entry with the message Successfully fetched catalog entries from broker.

3.4. Uninstalling the Template Service Broker

You can uninstall the Template Service Broker if you no longer require access to the template applications that it provides.

Important

The Template Service Broker is deprecated in OpenShift Container Platform 4. Equivalent and better functionality is present in the Operator Framework and Operator Lifecycle Manager (OLM).

Note

By default, the Samples Operator handles Red Hat Enterprise Linux (RHEL)-based OpenShift Container Platform imagestreams and OpenShift Container Platform templates. See Configuring the Samples Operator for details.

3.4.1. Uninstalling the Template Service Broker

The following procedure uninstalls the Template Service Broker and its Operator using the web console.

Warning

Do not uninstall the Template Service Broker if there are any provisioned services from it in your cluster, otherwise you might encounter errors when trying to manage the services.

Prerequisites

  • The Template Service Broker is installed.

Procedure

This procedure assumes that you installed the Template Service Broker into the openshift-template-service-broker project.

  1. Uninstall the Template Service Broker.

    1. Navigate to Operators Installed Operators and select the openshift-template-service-broker project from the drop-down menu.
    2. Click Template Service Broker Operator.
    3. Select the Template Service Broker tab.
    4. Click template-service-broker.
    5. From the Actions drop-down menu, select Delete Template Service Broker.
    6. Click Delete from the confirmation pop-up window.

      The Template Service Broker is now uninstalled, and template applications will soon be removed from the Developer Catalog.

  2. Uninstall the Template Service Broker Operator.

    1. From the Operators Installed Operators page, scroll or type a keyword into the Filter by name to find the Template Service Broker Operator, then click on it.
    2. On the right-hand side of the Operator Details page, select Uninstall Operator from the Actions drop-down menu.
    3. When prompted by the Remove Operator Subscription window, optionally select the Also completely remove the Operator from the selected namespace check box if you want all components related to the installation to be removed. This removes the CSV, which in turn removes the Pods, Deployments, CRDs, and CRs associated with the Operator.
    4. Select Remove. This Operator will stop running and no longer receive updates. The Template Service Broker Operator is no longer installed in your cluster.

After the Template Service Broker is uninstalled, users will no longer have access to the template applications provided by the Template Service Broker.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.