This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.第 18 章 Load balancing on RHOSP
If your OpenShift Container Platform cluster uses Kuryr and was installed on a Red Hat OpenStack Platform (RHOSP) 13 cloud that was later upgraded to RHOSP 16, you can configure it to use the Octavia OVN provider driver.
Kuryr replaces existing load balancers after you change provider drivers. This process results in some downtime.
Prerequisites
-
Install the RHOSP CLI,
openstack. -
Install the OpenShift Container Platform CLI,
oc. Verify that the Octavia OVN driver on RHOSP is enabled.
提示To view a list of available Octavia drivers, on a command line, enter
openstack loadbalancer provider list.The
ovndriver is displayed in the command’s output.
Procedure
To change from the Octavia Amphora provider driver to Octavia OVN:
Open the
kuryr-configConfigMap. On a command line, enter:oc -n openshift-kuryr edit cm kuryr-config
$ oc -n openshift-kuryr edit cm kuryr-configCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the ConfigMap, delete the line that contains
kuryr-octavia-provider: default. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Delete this line. The cluster will regenerate it with
ovnas the value.
Wait for the Cluster Network Operator to detect the modification and to redeploy the
kuryr-controllerandkuryr-cnipods. This process might take several minutes.Verify that the
kuryr-configConfigMap annotation is present withovnas its value. On a command line, enter:oc -n openshift-kuryr edit cm kuryr-config
$ oc -n openshift-kuryr edit cm kuryr-configCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
ovnprovider value is displayed in the output:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that RHOSP recreated its load balancers.
On a command line, enter:
openstack loadbalancer list | grep amphora
$ openstack loadbalancer list | grep amphoraCopy to Clipboard Copied! Toggle word wrap Toggle overflow A single Amphora load balancer is displayed. For example:
a4db683b-2b7b-4988-a582-c39daaad7981 | ostest-7mbj6-kuryr-api-loadbalancer | 84c99c906edd475ba19478a9a6690efd | 172.30.0.1 | ACTIVE | amphora
a4db683b-2b7b-4988-a582-c39daaad7981 | ostest-7mbj6-kuryr-api-loadbalancer | 84c99c906edd475ba19478a9a6690efd | 172.30.0.1 | ACTIVE | amphoraCopy to Clipboard Copied! Toggle word wrap Toggle overflow Search for
ovnload balancers by entering:openstack loadbalancer list | grep ovn
$ openstack loadbalancer list | grep ovnCopy to Clipboard Copied! Toggle word wrap Toggle overflow The remaining load balancers of the
ovntype are displayed. For example:2dffe783-98ae-4048-98d0-32aa684664cc | openshift-apiserver-operator/metrics | 84c99c906edd475ba19478a9a6690efd | 172.30.167.119 | ACTIVE | ovn 0b1b2193-251f-4243-af39-2f99b29d18c5 | openshift-etcd/etcd | 84c99c906edd475ba19478a9a6690efd | 172.30.143.226 | ACTIVE | ovn f05b07fc-01b7-4673-bd4d-adaa4391458e | openshift-dns-operator/metrics | 84c99c906edd475ba19478a9a6690efd | 172.30.152.27 | ACTIVE | ovn
2dffe783-98ae-4048-98d0-32aa684664cc | openshift-apiserver-operator/metrics | 84c99c906edd475ba19478a9a6690efd | 172.30.167.119 | ACTIVE | ovn 0b1b2193-251f-4243-af39-2f99b29d18c5 | openshift-etcd/etcd | 84c99c906edd475ba19478a9a6690efd | 172.30.143.226 | ACTIVE | ovn f05b07fc-01b7-4673-bd4d-adaa4391458e | openshift-dns-operator/metrics | 84c99c906edd475ba19478a9a6690efd | 172.30.152.27 | ACTIVE | ovnCopy to Clipboard Copied! Toggle word wrap Toggle overflow