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.3. Scaling for ingress traffic by using RHOSP Octavia
You can use Octavia load balancers to scale Ingress controllers on clusters that use Kuryr.
Prerequisites
- Your OpenShift Container Platform cluster uses Kuryr.
- Octavia is available on your RHOSP deployment.
Procedure
To copy the current internal router service, on a command line, enter:
oc -n openshift-ingress get svc router-internal-default -o yaml > external_router.yaml
$ oc -n openshift-ingress get svc router-internal-default -o yaml > external_router.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow In the file
external_router.yaml
, change the values ofmetadata.name
andspec.type
toLoadBalancer
.Example router file
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You can delete timestamps and other information that is irrelevant to load balancing.
From a command line, create a service from the
external_router.yaml
file:oc apply -f external_router.yaml
$ oc apply -f external_router.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the external IP address of the service is the same as the one that is associated with the load balancer:
On a command line, retrieve the external IP address of the service:
oc -n openshift-ingress get svc
$ oc -n openshift-ingress get svc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE router-external-default LoadBalancer 172.30.235.33 10.46.22.161 80:30112/TCP,443:32359/TCP,1936:30317/TCP 3m38s router-internal-default ClusterIP 172.30.115.123 <none> 80/TCP,443/TCP,1936/TCP 22h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE router-external-default LoadBalancer 172.30.235.33 10.46.22.161 80:30112/TCP,443:32359/TCP,1936:30317/TCP 3m38s router-internal-default ClusterIP 172.30.115.123 <none> 80/TCP,443/TCP,1936/TCP 22h
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve the IP address of the load balancer:
openstack loadbalancer list | grep router-external
$ openstack loadbalancer list | grep router-external
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
| 21bf6afe-b498-4a16-a958-3229e83c002c | openshift-ingress/router-external-default | 66f3816acf1b431691b8d132cc9d793c | 172.30.235.33 | ACTIVE | octavia |
| 21bf6afe-b498-4a16-a958-3229e83c002c | openshift-ingress/router-external-default | 66f3816acf1b431691b8d132cc9d793c | 172.30.235.33 | ACTIVE | octavia |
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the addresses you retrieved in the previous steps are associated with each other in the floating IP list:
openstack floating ip list | grep 172.30.235.33
$ openstack floating ip list | grep 172.30.235.33
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
| e2f80e97-8266-4b69-8636-e58bacf1879e | 10.46.22.161 | 172.30.235.33 | 655e7122-806a-4e0a-a104-220c6e17bda6 | a565e55a-99e7-4d15-b4df-f9d7ee8c9deb | 66f3816acf1b431691b8d132cc9d793c |
| e2f80e97-8266-4b69-8636-e58bacf1879e | 10.46.22.161 | 172.30.235.33 | 655e7122-806a-4e0a-a104-220c6e17bda6 | a565e55a-99e7-4d15-b4df-f9d7ee8c9deb | 66f3816acf1b431691b8d132cc9d793c |
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
You can now use the value of EXTERNAL-IP
as the new Ingress address.
If Kuryr uses the Octavia Amphora driver, all traffic is routed through a single Amphora virtual machine (VM).
You can repeat this procedure to create additional load balancers, which can alleviate the bottleneck.