×

Installing the OpenShift Serverless Operator enables you to install and use Knative Serving, Knative Eventing, and Knative Kafka on a OpenShift Container Platform cluster. The OpenShift Serverless Operator manages Knative custom resource definitions (CRDs) for your cluster and enables you to configure them without directly modifying individual config maps for each component.

Before you begin

Read the following information about supported configurations and prerequisites before you install OpenShift Serverless.

  • OpenShift Serverless is supported for installation in a restricted network environment.

  • OpenShift Serverless currently cannot be used in a multi-tenant configuration on a single cluster.

Defining cluster size requirements

To install and use OpenShift Serverless, the OpenShift Container Platform cluster must be sized correctly.

The following requirements relate only to the pool of worker machines of the OpenShift Container Platform cluster. Control plane nodes are not used for general scheduling and are omitted from the requirements.

The minimum requirement to use OpenShift Serverless is a cluster with 10 CPUs and 40GB memory. By default, each pod requests ~400m of CPU, so the minimum requirements are based on this value.

The total size requirements to run OpenShift Serverless are dependent on the components that are installed and the applications that are deployed, and might vary depending on your deployment.

Scaling your cluster using machine sets

You can use the OpenShift Container Platform MachineSet API to manually scale your cluster up to the desired size. The minimum requirements usually mean that you must scale up one of the default machine sets by two additional machines. See Manually scaling a machine set.

Installing the OpenShift Serverless Operator from the web console

You can install the OpenShift Serverless Operator from the OperatorHub by using the OpenShift Container Platform web console. Installing this Operator enables you to install and use Knative components.

Prerequisites
  • You have access to an OpenShift Container Platform account with cluster administrator access.

  • You have logged in to the OpenShift Container Platform web console.

Procedure
  1. In the OpenShift Container Platform web console, navigate to the OperatorsOperatorHub page.

  2. Scroll, or type the keyword Serverless into the Filter by keyword box to find the OpenShift Serverless Operator.

  3. Review the information about the Operator and click Install.

  4. On the Install Operator page:

    1. The Installation Mode is All namespaces on the cluster (default). This mode installs the Operator in the default openshift-serverless namespace to watch and be made available to all namespaces in the cluster.

    2. The Installed Namespace is openshift-serverless.

    3. Select the stable channel as the Update Channel. The stable channel will enable installation of the latest stable release of the OpenShift Serverless Operator.

    4. Select Automatic or Manual approval strategy.

  5. Click Install to make the Operator available to the selected namespaces on this OpenShift Container Platform cluster.

  6. From the CatalogOperator Management page, you can monitor the OpenShift Serverless Operator subscription’s installation and upgrade progress.

    1. If you selected a Manual approval strategy, the subscription’s upgrade status will remain Upgrading until you review and approve its install plan. After approving on the Install Plan page, the subscription upgrade status moves to Up to date.

    2. If you selected an Automatic approval strategy, the upgrade status should resolve to Up to date without intervention.

Verification

After the Subscription’s upgrade status is Up to date, select CatalogInstalled Operators to verify that the OpenShift Serverless Operator eventually shows up and its Status ultimately resolves to InstallSucceeded in the relevant namespace.

If it does not:

  1. Switch to the CatalogOperator Management page and inspect the Operator Subscriptions and Install Plans tabs for any failure or errors under Status.

  2. Check the logs in any pods in the openshift-serverless project on the WorkloadsPods page that are reporting issues to troubleshoot further.

If you want to use Red Hat OpenShift distributed tracing with OpenShift Serverless, you must install and configure Red Hat OpenShift distributed tracing before you install Knative Serving or Knative Eventing.

Installing the OpenShift Serverless Operator from the CLI

You can install the OpenShift Serverless Operator from the OperatorHub by using the CLI. Installing this Operator enables you to install and use Knative components.

Prerequisites
  • You have access to an OpenShift Container Platform account with cluster administrator access.

  • Your cluster has the Marketplace capability enabled or the Red Hat Operator catalog source configured manually.

  • You have logged in to the OpenShift Container Platform cluster.

Procedure
  1. Create a YAML file containing Namespace, OperatorGroup, and Subscription objects to subscribe a namespace to the OpenShift Serverless Operator. For example, create the file serverless-subscription.yaml with the following content:

    Example subscription
    ---
    apiVersion: v1
    kind: Namespace
    metadata:
      name: openshift-serverless
    ---
    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: serverless-operators
      namespace: openshift-serverless
    spec: {}
    ---
    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: serverless-operator
      namespace: openshift-serverless
    spec:
      channel: stable (1)
      name: serverless-operator (2)
      source: redhat-operators (3)
      sourceNamespace: openshift-marketplace (4)
    1 The channel name of the Operator. The stable channel enables installation of the most recent stable version of the OpenShift Serverless Operator.
    2 The name of the Operator to subscribe to. For the OpenShift Serverless Operator, this is always serverless-operator.
    3 The name of the CatalogSource that provides the Operator. Use redhat-operators for the default OperatorHub catalog sources.
    4 The namespace of the CatalogSource. Use openshift-marketplace for the default OperatorHub catalog sources.
  2. Create the Subscription object:

    $ oc apply -f serverless-subscription.yaml
Verification

Check that the cluster service version (CSV) has reached the Succeeded phase:

Example command
$ oc get csv
Example output
NAME                          DISPLAY                        VERSION   REPLACES                      PHASE
serverless-operator.v1.25.0   Red Hat OpenShift Serverless   1.25.0    serverless-operator.v1.24.0   Succeeded

If you want to use Red Hat OpenShift distributed tracing with OpenShift Serverless, you must install and configure Red Hat OpenShift distributed tracing before you install Knative Serving or Knative Eventing.

Next steps