Knative serving is set to use one replica instead of two
If Knative serving is not set to use two replicas, any action that needs to drain the node with the Knative replica pod, such as upgrading Red Hat® OpenShift® Container Platform, fails.
Symptoms
The Knative deployment is configured with a Pod Disruption Budget with a minAvailable of one pod. The node where the pod currently is running cannot drain because only one pod is available and the Pod Disruption Budget requires that at least one pod remains available.
Resolving the problem
To verify that Knative serving is set to use two replicas by using the command line, follow these steps.
- Verify that Knative serving is set to use two replicas by typing the following
command.
oc get knativeserving knative-serving -n knative-serving -o jsonpath='{.spec.high-availability.replicas}'
- If Knative serving is set to use one replica, increase the replicas to two by typing the
following
command.
oc patch knativeserving knative-serving -n knative-serving --type json -p '[{"op": "replace", "path": "/spec/high-availability/replicas", "value": 2}]'
- Verify that the change is complete by typing the following command and looking to see whether
deployments are
2/2
in the output.oc get deploy activator webhook -n knative-serving
To verify that Knative serving is set to use two replicas by using the Red Hat OpenShift web console, follow these steps.
- Go to Project is set to knative-serving. and ensure that the
- Click the Knative Serving link in the Provided APIs column.
- Click knative-serving.
- On the YAML tab, look for
high-availability:replicas:
. If Knative serving is set to use two replicas, you can proceed to upgrading Red Hat OpenShift Container Platform. If it is set to use one replica, change the 1 to a 2 and click Save. - Go to
activator and webhook statuses both
show
2 of 2 pods
.
and
verify that the