High availability (HA) is a standard feature of Kubernetes APIs that helps to ensure that APIs stay operational if a disruption occurs. In an HA deployment, if an active controller crashes or is deleted, another controller is available to take over processing of the APIs that were being serviced by the controller that is now unavailable.
HA in OpenShift Serverless is available through leader election, which is enabled by default after the Knative Serving or Eventing control plane is installed.
When using a leader election HA pattern, instances of controllers are already scheduled and running inside the cluster before they are required. These controller instances compete to use a shared resource, known as the leader election lock. The instance of the controller that has access to the leader election lock resource at any given time is referred to as the leader.
High availability (HA) functionality is available by default on OpenShift Serverless for Knative Serving, Knative Eventing, and Knative Kafka. These are the components scaled for each of them:
These components are configured with two replicas by default.
For Knative Eventing, the
mt-broker-ingress deployments are not scaled by HA. If multiple deployments are needed, scale these components manually.
You modify the number of replicas that are created per component by changing the configuration of
spec.high-availability.replicas in the KnativeServing custom resource (CR), the KnativeEventing CR, or the KnativeKafka CR.
You can scale Knative Serving components by modifying the
spec.high-availability.replicas value in the KnativeServing custom resource.
You have access to an OpenShift Container Platform cluster with cluster administrator permissions.
The OpenShift Serverless Operator and Knative Serving are installed on your cluster.
In the OpenShift Container Platform web console Administrator perspective, navigate to OperatorHub → Installed Operators.
Click Knative Serving in the list of Provided APIs for the OpenShift Serverless Operator to go to the Knative Serving tab.