OpenShift Serverless Functions is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see https://access.redhat.com/support/offerings/techpreview/.

Before you can develop functions on OpenShift Serverless, you must complete the set up steps.

Prerequisites

To enable the use of OpenShift Serverless Functions on your cluster, you must complete the following steps:

  • OpenShift Serverless is installed on your cluster.

  • The oc CLI is installed on your cluster.

  • The Knative (kn) CLI is installed on your cluster. Installing the kn CLI enables the use of kn func commands which you can use to create and manage functions.

  • You have installed Docker Container Engine or podman, and have access to an available image registry.

  • If you are using Quay.io as the image registry, you must ensure that either the repository is not private, or that you have followed the OpenShift Container Platform documentation on Allowing pods to reference images from other secured registries.

  • If you are using the OpenShift Container Registry, a cluster administrator must expose the registry.

Using podman

If you are using podman, you must run the following commands before getting started with OpenShift Serverless Functions:

  1. Start the podman service that serves the Docker API on a UNIX socket at ${XDG_RUNTIME_DIR}/podman/podman.sock:

    $ systemctl start --user podman.socket

    On most systems, this socket is located at /run/user/$(id -u)/podman/podman.sock.

  2. Establish the environment variable that is used to build a function:

    $ export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/podman/podman.sock"
  3. Run the build command with -v to see verbose output. You should see a connection to your local UNIX socket:

    $ kn func build -v

Next steps